Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: moving files

by Athanasius (Abbot)
on Oct 16, 2012 at 07:33 UTC ( #999244=note: print w/ replies, xml ) Need Help??


in reply to moving files

It’s hard to say what’s going wrong when you don’t show either the loop code or the contents of $fil_nm.

However, it’s not necessary to use system — the core module File::Copy has a move function. Here’s a guess at what you’re trying to do:

use File::Copy; my @files_to_move = split(/\s+/, $fil_nm); # assuming $fil_nm contain +s a space-separated list of files to move move($_, './reports') for @files_to_move;

Hope that helps,

Athanasius <°(((><contra mundum


Comment on Re: moving files
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (16)
As of 2015-07-07 20:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls