Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Correct pathway to a file

by tobyink (Abbot)
on Jan 10, 2013 at 13:13 UTC ( #1012657=note: print w/ replies, xml ) Need Help??

in reply to Correct pathway to a file

No, they don't need to be in the same directory. Just use the full path to the file when opening it...

open my $fh, '<', '/home/tai/Documents/foo.txt'; while (my $line = <$fh>) { print "Got line: $line"; } close $fh;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Comment on Re: Correct pathway to a file
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-11-26 08:17 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls