SPUG: flip-flops
ced at carios2.ca.boeing.com
ced at carios2.ca.boeing.com
Thu Feb 14 20:52:39 CST 2002
sthoenna at efn.org (Yitzchak Scott-Thoennes) writes:
>> How about:
>>
>> perl -pe'(/^$/..eof&&(close*ARGV||1))==1and$_.=("="x40)."\n"'
> Do you play Perl golf? Does your editor's perl-mode prevent
> unnecessary spaces?
Deparse has a nice replay:
perl -M'O (Deparse,-p)' -pe'(/^$/..eof&&(close*ARGV||1))==1and$_.=("="x40)."\n"'
LINE: while (defined($_ = <ARGV>)) {
$_ .= '=' x 40 . "\n" if (/^$/ .. eof && (close *ARGV || 1)) == 1;
}
continue {
print $_;
}
-e syntax OK
Rgds,
--
Charles DeRykus
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list