in reply to Re: Win32 Opening files
in thread Win32 Opening files

Perhaps it might work better in windows if you break it down into simpler elements, for instance
sub parse_mail ( my @mail; @mail = @_; foreach my $mail ( @mail ) { open (MAIL,$mail) || die "Cannot open $mail, $!"; push @mailf, <MAIL>; chomp (@mailf); close (MAIL) || die "Cannot close $mail, $!"; } return @mailf; }

I realize that you have set up a shortcut in the code, but I have found perl works better in Windows if I avoid shortcuts in the code, I don't know why.

MadraghRua
yet another biologist hacking perl....

Replies are listed 'Best First'.
Re (3): Win32 Opening files (code)
by deprecated (Priest) on Jun 30, 2001 at 21:29 UTC
    Whats the deal with this line:
    foreach my $mail ( @mail ) {
    or this :
    my @mail; @mail = @_;
    Why not just say:
    foreach my $mail (@_) {
    and using $mail as the looping element of @mail is kind of silly... I dont know that perl would even let you do that (at least not with strict and warnings).

    --
    Laziness, Impatience, Hubris, and Generosity.