Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: calling .EXE through Perl script

by dokkeldepper (Friar)
on May 11, 2006 at 08:39 UTC ( [id://548639]=note: print w/replies, xml ) Need Help??


in reply to calling .EXE through Perl script

untested, sorry have no system here to do it, but it should give you the direction.

See also:

use File::Find; find(\&run, '.'); sub run{ system("bla.exe $File::Find::name"); }

Replies are listed 'Best First'.
Re^2: calling .EXE through Perl script
by GrandFather (Saint) on May 11, 2006 at 08:58 UTC

    It's not clear that the OP wants to recurse down a tree and process each of the files found. Even if that is the case, as it stands your sample code will try and process directories as well as files. At least the following line should be added to sub run before the system call:

    return if ! -f $File::Find::name;

    For scanning a single directory it is probably easier to simple use opendir/readdir as shown elsewhere.


    DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found