Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Broken Function

by Happy-the-monk (Abbot)
on Apr 04, 2014 at 13:22 UTC ( #1081128=note: print w/ replies, xml ) Need Help??


in reply to Broken Function

Perl has a -e test builtin, no need to use the shell's test function.

But a -r test suggests itself if you need to read the file.

If this is not just a fiddle-with-perl exercise, what you are doing is basically copying a file. You could shortcut all of it to use File::Basename qw(basename); use File::Copy qw(copy); copy $_[0], basename $_[0];

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2016-07-30 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (267 votes). Check out past polls.