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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
1 more ?


New User

May 15, 2004, 8:51 PM

Post #1 of 2 (601 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

Thaumaturge / Moderator

May 17, 2004, 7:06 AM

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

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

open FILE, $file or die $!;

Dave Cross, Perl Hacker, Trainer and Writer
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