Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Moving Files

by tptass (Sexton)
on Aug 08, 2008 at 00:33 UTC ( [id://703028]=note: print w/replies, xml ) Need Help??


in reply to Moving Files

Moving Files:

  • Simply use the Perl rename function.
  • Why can't you simply just use open to redirect the output to the correct place in the first place? But yet again you aren't probably just writing out information...

Executing other perl scripts:

  • You can use the perl system command, likes others have mentioned above.
  • Or, if you implement the sub-perl script as subroutines , you could use do. You basically pass the name of the file to be processed as an argument to the subroutine, rather than a command-line argument. Make sure there are no global variables shared between the scripts. Then, it should be easy to execute 'do "subScript.pl"' in mainScript.pl, which will make the subroutine(s) in subScript.pl available to the statements in mainScript.pl.

Updates once a month:

  • Use a cronjob or scheduler to perform this.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-18 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found