Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Grab input from the user and Open the file

by shmem (Chancellor)
on Nov 26, 2016 at 19:18 UTC ( [id://1176614]=note: print w/replies, xml ) Need Help??


in reply to Grab input from the user and Open the file

my $directory = '/home/psimo/it441/challenge/logs'; ... open(FH, '<', '/home/psimo/it441/challenge/logs/$theFile') or die "CAN +'T OPEN FILE! you don't have the log file\n";

Since you have the directory hardcoded, you should say:

open FH, '<', "$directory/$theFile" or die "CAN'T OPEN FILE! you don't + have the log file\n";

Note the usage of double quotes in my suggestion. Single quotes take $theFile as literal, while double quotes interpolate the variables content.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (9)
As of 2024-04-23 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found