On 13 Sep 2011, at 00:09, John Delacour wrote:

> #!/usr/bin/perl
> use strict;
> my $i;
> while(<>){ # or ...<STDIN>
>  $i++;
>  print sprintf("%4d: ",$i), $_;
> }
> __END__

I think this one has continued working because it's written in Perl
using the <> idiom. I believe Perl is smart about this and uses the
files on argv or reads from stdin depending on context; in this case,
the script behaves as before because Perl has automatically made the
change for you! Isn't that clever.

— dpk.

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to