| Next | The Perl Hardware Store | DC.pm Version | 64 |
Temptation: declare logical like this:
sub logical ($)
Then you could say:
print logical $struct, "\n";
Don't do this, because then this won't work:
print logical $struct1, $struct2, "\n"
Instead, fix logical to handle multiple arguments and to return plain strings unchanged.
sub logical {
my @args =@_;
for (@args) {
next unless ref;
...
}
return @args;
}
| Next | ![]() |
Copyright © 2003 M. J. Dominus |