On Tue, 14 Sep 2004, Matt Diephouse wrote:
> Or in Perl 5, which has to use 2 subs to have the same interface (code
^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
Huh?!?
#!/usr/bin/perl -l
use strict;
use warnings;
sub extp ($@) {
my $t=shift;
@$t ? return @_ :
pack shift @$t, extp $t, @_;
}
sub extup ($@) {
my $t=shift;
@$t ? return @_ :
unpack shift @$t, (extup $t, @_);
}
print for extup [qw/L* w u/],
extp [qw/u w L*/], 1..5;
__END__
--
> 4 words: it-was-a-joke!
4 words: he-has-no-clue!!
- Uri Guttman on clpmisc (slightly edited)