anthony wrote:
I am wondering if how you are going about this is completely wrong, why is the second script being called over the command line (pipe) in teh first place. Lets back up a few steps first...Hi,what i'm creating is just an EXTREMELY script that sends an array to another script via PIPE. This is what i have: ################ #! /usr/bin/perl @file = qw (tony boby zombie anthony martine eric charlie); open(SORT, "| perl sorted.pl"); while(@file){ chomp $_; print SORT "$_\n"; } print "DID it WORKed??"; ########################### Now in my other script called sorted. pl i'm using the "sort" command to sort the array. But my question is How should i write the sorted.pl script to received the data and then send it back If you could write the code for me please. I tried, @ARGV - <STDIN> or shift but no luck. I really don't know how to do it Any help GREATLY appreciated, maybe my other script is also wrong,
Is there a reason why the built-in 'sort' can't be used?
perldoc -f sort
Is there a reason why the functionality in the 'sorted.pl' can't be encapsulated, and then 'require'd or 'use'd, and then call the subroutine that would encapsulate that functionality?
If all you are trying to do is sort an array it should be *much* simpler than this...
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]