Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Paths in Perl

by tachyon (Chancellor)
on Sep 04, 2001 at 17:43 UTC ( #110030=perltutorial: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $perl_path = '/foo/bar/baz';
    (my $win_path = $perl_path) =~ tr!/!\\!;
    print "Perl still sees:  $perl_path\n";
    print "But we can print: $win_path\n";
    
  2. or download this
    my $perl_path = '/foo/bar/baz';
    print "This is the Windows path: ", win_path($perl_path), "\n";
    
    ...
        (my $path = shift) =~ tr!/!\\!;
      return $path;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perltutorial [id://110030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-09-27 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (493 votes). Check out past polls.