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

Re: Command line confusing me

by benn (Priest)
on Aug 26, 2003 at 09:53 UTC ( #286639=note: print w/ replies, xml ) Need Help??


in reply to Command line confusing me

Once you've installed the modules using Zaxo's advice, there are a couple of ways to interface to your data analysis scripts.

The simplest would be to externally call them from within your program, using backticks or similar - something like this...

my $munged_data = `analysis_program $data`;
Alternatively, you could look into including the scripts in your source. Any modules should be easily importable with the 'use' statement, and it should be a simple task to replace command line parameters with passed-in parameters...something like this...
#Old Code my $data = $ARGV[0]; do_stuff($data); #New Code package Munger; sub munge_data { my $data = shift(); do_stuff($data); } 1;
HTH
Ben.


Comment on Re: Command line confusing me
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-05 05:08 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 (60 votes), past polls