Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Error while trying to open a file

by k_manimuthu (Monk)
on Jan 05, 2011 at 04:11 UTC ( [id://880512]=note: print w/replies, xml ) Need Help??


in reply to Error while trying to open a file

Check the file is exists or not.

$file='File Path'; print "\nFile $file ", (-e $file && -f $file ) ? "exists" : "doesn't e +xists";

Get the OS error by using of $!

open (FILEHANDELER,"FILEPATH") || die "Cannot open the input file : $! +";

And check the file permission

Replies are listed 'Best First'.
Re^2: Error while trying to open a file
by ritchie (Initiate) on Jan 05, 2011 at 15:41 UTC
    The file exists and it has read and write permission too. If i replace $artefact with the name of the file it works.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2024-04-25 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found