"Beau E. Cox" wrote:
>
> Hi all -
Hello,
> I would like to recommend "Effective Perl Programming" by Joseph N. Hall
> with Randal L, Schwartz, Addison-Wesley, 1998, ISBN 0-201-41975-0. Although
> "old", it has really helped my style.
Anyone want an autographed copy?[0] :-)
> I was raised with c. My early Perl efforts were very c-ish. For example, to
> print an array I went from:
>
> for (my $i = 0; $i < scalar (@array}; $i++) {
> print ("$array[$i]\n");
> }
BTDTGTTS[1]
> to:
>
> print "$_\n" for (@array);
>
> Now, if I could just find a book that would tell me how to condense this
> further to:
>
> ;
How about:
$,=$/;print@array; # :-)
> and having got that far, remembering that the trailing semicolon in a block
> is optional, to:
Semi-colons, like commas, are separators not terminators.
John
[0] sorry I'm keeping it.
[1] for you acronymly impared - Been There, Done That, Got The T-Shirt
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]