By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,777 Members | 1,755 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,777 IT Pros & Developers. It's quick & easy.

Double back slahses from nowhere?

P: 2
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
Share this Question
Share on Google+
3 Replies


KevinADC
Expert 2.5K+
P: 4,059
hehehe.... you sure jumped forums quickly.
Aug 5 '08 #2

P: 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

P: 7
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.