in reply to Win32 Opening files
@_ contains the list of arguments to your function, and when you interpolate it in a string, you get all your parameters separated by a space (unless you fiddled with some funny variables, but I assume you didn't).
I suppose you pass your two full pathnames as arguments, so you have to loop on @_:
sub parse_mail { my @mail; foreach my $mail ( @_ ) { open (MAIL,$mail) || die "Cannot open $mail, $!"; push @mailf, <MAIL>; chomp (@mailf); close (MAIL) || die "Cannot close $mail, $!"; } return @mailf; }
I also assume you want to concatenate both files. But may be it's better that your sub handles one file at a time and you call it from within a loop...
--bwana147
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Win32 Opening files
by Dalin (Sexton) on Jun 29, 2001 at 19:15 UTC | |
by larryk (Friar) on Jun 29, 2001 at 19:36 UTC | |
|
Re: Re: Win32 Opening files
by MadraghRua (Vicar) on Jun 30, 2001 at 03:02 UTC | |
by deprecated (Priest) on Jun 30, 2001 at 21:29 UTC |