"John W. Krahn" wrote:
>
> A more perl-ish way to write that:
>
> while ( <INPUT> ) {
Oops, forgot to chomp.
chomp;
> next if /^\s*(?:#|$)/; #if line begins with a # or line is blank
> print MESS if /\w/;
> print { /[A-Za-z]/ ? *TIDY : *MESS } $_;
>
> # split the string into 2 parts string 1, 2 separated with a tab.
> my ( $first, $second ) = split /\t/;
>
> # compare the first element of the list with the last element.
> print { $first eq $second ? *MESS : *TIDY } $_;
> }
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>