Hi, i'm trying to learn pipe, so i need start somewhere i could of just say sort @file print @file and that is it but like i said i want to learn the mechanism of pipe
Anthony "Anthony" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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, > > Anthony > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]