Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Broken Function

by Happy-the-monk (Monsignor)
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)


Comment on Re: Broken Function
Select or Download Code

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 perusing the Monastery: (3)
As of 2014-09-24 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (246 votes), past polls