I figured it out. I thought I'd post what I found. > I've cobbled some code together to test stuff out with: > > #!/usr/bin/perl > > use warnings; > use strict; > > my @addresses; > my @message; > > if( @ARGV ) { > print "There are arguments\n"; > while( $ARGV[0] =~ /[EMAIL PROTECTED]/ ) {
The above line of code was the culprit. I added a check to make sure @ARGV wasn't empty and everything worked out. This line looks like this now: while( @ARGV && $ARGV[0] =~ /[EMAIL PROTECTED]/ ) { > push @addresses, $ARGV[0].', '; > shift; > } > print "@addresses\n"; > } else { > print "There are no arguments\n"; > } > > while( <> ) { > if( /^.$/ ) { > last; > } else { > push @message, $_; > } > } > > print "\n\nThe following message will be sent:\n"; > print "@message\n"; > --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>