Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
We don't bite newbies here... much
 
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 about the Monastery: (11)
As of 2014-04-23 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (554 votes), past polls