Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Error while trying to open a file

by k_manimuthu (Monk)
on Jan 05, 2011 at 04:11 UTC ( #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


Comment on Re: Error while trying to open a file
Select or Download Code
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
Node Status?
node history
Node Type: note [id://880512]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (17)
As of 2014-07-24 13:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (160 votes), past polls