CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
1 more ?

 



brooklyn1126
New User

May 15, 2004, 8:51 PM

Post #1 of 2 (476 views)
1 more ? Can't Post

I have one more question. When i want to read from a file i have to save that file into the same directory as the .pl file that i am compliling in order to read it. How do i open a file from another directory on my computer?

Thanks again


davorg
Thaumaturge / Moderator

May 17, 2004, 7:06 AM

Post #2 of 2 (472 views)
Re: [brooklyn1126] 1 more ? [In reply to] Can't Post


Code
my $file = '/path/to/file/in/some/other/directory'; 

open FILE, $file or die $!;


--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives