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


New User

Oct 12, 2017, 10:50 AM

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

use strict; 
use warnings;

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

my $protein = <PROTEIN>;

print 'success';

close (PROTEIN);


Thanks in advance

Veteran / Moderator

Oct 12, 2017, 11:09 PM

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