[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Self Aware Data routines?



>From: Michael Assels <mjassels@cs.concordia.ca>
>Date: Fri, Jun 25, 1999, 12:41 PM
>

>   while (<DATA>) {
>     no strict 'refs';  # save one keystroke :-)
>     chomp;
>     defined &$_ ? &$_ : print "Sorry, I don't see a Subroutine\n\t$_\n";
>   }
>
> Your "m/^(.+)$/io" amounts to a "chomp" (and doesn't need the "io" options).
> Also, there's no need to test the definedness of &$$vSub twice.

Thx :)

>
> Here's a nice trivia question:
>
> Why does your program still work if "\m/^(.+)$/io" is replaced by
> "m/^(.+)$/io"?  (The backslash is removed.)

Not sure what you mean?  I used a \ (reference), hence
the &$$var mainly because in my bigger project,
$_ is getting nuked with each interation...

???
-Sneex-  :]
FCCJ Data Security Group
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org