in reply to Re: Use of uninitialized value $site in concatenation (.) when excute the perl script
in thread Use of uninitialized value $site in concatenation (.) when excute the perl script
And, foreach my $line (<LOGFILE>) reads the whole LOGFILE straight into memory before starting to enumerate through the lines. (Unless Perl has special-case handling for that case. Which I don't recall Perl having.) The OP should use the iterator form: while (my $line = <LOGFILE>) {
|
|---|