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:
finding file paths

 



spoon4000
New User

Oct 12, 2017, 10:50 AM

Post #1 of 2 (574 views)
finding file paths Can't Post

Im literally trying to make it do the simplest thing. I just want it to successfully locate a file but it always give me this error.

No such file or directory at C:\Users\***\perl\reading.pl line 8.

I know the file is there, I put it there. why won't the program look where i'm telling it to look


Code
use strict; 
use warnings;

open (PROTEIN, '<','C:\\Users\\***\\Documents\\protein_data\\NM_021964.txt',) or die $!;

my $protein = <PROTEIN>;

print 'success';

close (PROTEIN);

exit


Thanks in advance


Laurent_R
Veteran / Moderator

Oct 12, 2017, 11:09 PM

Post #2 of 2 (570 views)
Re: [spoon4000] finding file paths [In reply to] Can't Post

Do you actually have a subdirectory called "***"? Or do you mean these three asterisks to be a wildcard for any subdirectory having itself a \\Documents\\protein_data subdirectory tree?

 
 


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

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