Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Query on Perl system command

by Anonymous Monk
on Mar 04, 2011 at 13:24 UTC ( [id://891446]=note: print w/replies, xml ) Need Help??


in reply to Re: Query on Perl system command
in thread Query on Perl system command

When I modified

system 'echo "$filename.txt\n$filename.xls\n" | phylip';

with

qq(echo "$filename.txt\n$filename.xls\n" | phylip );

OR with

qq~echo "$filename.txt\n$filename.xls\n" | phylip ~;

I get the following error message

"Useless use of string in void context at alignment.pl line 75."

Any idea, why this is happening ? (I am newbie to perl)

I appreciate your help

Replies are listed 'Best First'.
Re^3: Query on Perl system command
by ww (Archbishop) on Mar 04, 2011 at 13:42 UTC
    I'm a newbie to your code.

    Which is / what's in "Line 75?"

      Oops... I copied entire error message !!

      qq(echo "$filename.txt\n$filename.xls\n" | phylip );
      This piece of code is in line 75

      If you allow me to complicate my script, The complete system command looks like this...

      system 'echo "4\n6\n3\n5\n\n1\n$filename.fsmi\n5\n$filename.phb\n111\n +1000\n4\n$filename.ph\n$filename.dst\n\n2\n" | phylip';

      phylip has many options, and user have to choose the option by pressing 1 or 2 or 3 or 4 ... etc. The point of giving output file name comes after choosing many such options. When I run "phylip" program separately (by "seperately", I mean, running "phylip" outside perl script) I type 1,2 or 3...etc and press ENTER key to choose that option. When I am calling "phylip" inside perl script, I use "\n" as a substitute for ENTER key

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-19 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found