I forgot to CC the list with my last post! sorry, won't happen again. --Errin
---------- Forwarded message ---------- From: Errin Larsen <[EMAIL PROTECTED]> Date: Fri, 10 Sep 2004 15:46:33 -0500 Subject: Re: How to dynamically taking the multiple input arguments? To: Bee <[EMAIL PROTECTED]> Alrighty ... So the code I've got now is below. Some of the variables' names have changed to make things slightly less confusing (probably only less confusing for me!). I also moved those parens arount the 'shift' function so it communicates the precendence (again, in my opinion) a little more clearly. I have tested this and it seems to work! comments? #!/usr/bin/perl use warnings; use strict; unless( @ARGV >= 2 ) { die "Usage: $0 file1 file2 [file3...]\n"; } my @final_results = (); foreach my $file ( @ARGV ) { open IN, $file or die "Couldn't open $file: $!\n"; my @tmp_results = map{ s/\s+//g; ( shift @final_results ).$_ } ( <IN> ); @final_results = @tmp_results; close IN; } print "$_\n" foreach( @final_results ); btw, thanks for all the help and explanations David and Bee (sorry about my ignorance of the HTH!). I hope Edward (the original poster!) has been paying attention! --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>