467,179 Members | 1,214 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,179 developers. It's quick & easy.

Double back slahses from nowhere?

Expand|Select|Wrap|Line Numbers
  1. #!C:\Perl\bin\perl.exe -w
  2. use CGI;
  3. use Net::FTP;
  4. my $q = new CGI;
  5. #my $thefile = $q->param('filename');
  6. $thefile = "name.ts";
  7. my $dl = chr(92);
  8. $localdir = join ($dl, "S:", "Free");
  9. $filename = join ($dl, $localdir, $thefile);
  10. $ftpobj = Net::FTP -> new ("192.168.0.2");
  11. $ftpobj -> login("cms","cm5u53r");
  12. $ftpobj -> binary;
  13. $ftpobj -> put ($filename);
  14. $ftpobj -> quit;
  15. #unlink $filename;
  16. print "Content-type: text/html\n\n";
  17. print "\n<html><head>";
  18. print "<title>Uploading Complete</title>";
  19. print "</head>";
  20. print "<body><h2>Uploading Complete</h2><br><br>filename: [$filename] thefile: [$thefile]<br><br>";
  21. print "</body></html>";
the error:
Expand|Select|Wrap|Line Numbers
  1. [Tue Aug 05 10:47:08 2008] [error] [client 172.16.71.53] Cannot open Local file S:\\Free\\name.ts: No such file or directory, referer: http://172.16.71.53/Encore.html
  2. [Tue Aug 05 10:47:08 2008] [error] [client 172.16.71.53]  at C:/CGI-bin/Encore.pl line 13, referer: http://172.16.71.53/Encore.html

Where are the double backslashes coming from? This is killing me!!!!
Aug 5 '08 #1
  • viewed: 1037
Share:
3 Replies
KevinADC
Expert 2GB
hehehe.... you sure jumped forums quickly.
Aug 5 '08 #2
yeah I noticed you were on here as the highest poster and I was like crap he's gonna think I'm a an @ss. haha

It's just something I really need to figure out and very very soon. The software team here at work is also stumped so I am just reachin out everywhere!
Aug 5 '08 #3
Instead of trying ...
$localdir = join ($dl, "S:", "Free");
$filename = join ($dl, $localdir, $thefile);

you should have written :

$filename = join ($dl, "S:","Free",$thefile);
Aug 6 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Randell D. | last post: by
14 posts views Thread by Lyle Fairfield | last post: by
29 posts views Thread by Tom wilson | last post: by
6 posts views Thread by tshad | last post: by
67 posts views Thread by lcw1964 | last post: by
11 posts views Thread by Ole Nielsby | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.