Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Read, Load and rename files from CD

by pvaldes (Chaplain)
on Oct 16, 2013 at 13:52 UTC ( #1058446=note: print w/ replies, xml ) Need Help??


in reply to Read, Load and rename files from CD

can't see the point of having this line: system("clear"); maybe you need a chdir instead?

...And this is not correct because you need to define the variable first

chomp $fileName; my $fileName = <STDIN>;

Better like this:

my $fileName = <STDIN>; chomp $fileName;

You can use also a more compact form saving one line. Parens are required:

chomp (my $filename = <STDIN>);

What is "the correct file" for you? all files in the CD?


Comment on Re: Read, Load and rename files from CD
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-12-27 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls