in reply to RE: Wanted feature in perl 6
in thread Wanted feature in perl 6
It allows a gretaer amout of flexibility in the calling of your sub.process( text => 'this is some text' ); process( file => 'foo' ); sub process { my $text; if( defined $_{'text'} ) { $text = $_{'text'}; } elsif( defined $_{'file'} ) { local $/; open IN, $_{'file'}; $text = <IN>; close IN; } else { die "Usage"; } #proccess $text and return result }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Wanted feature in perl 6
by agoth (Chaplain) on Aug 07, 2000 at 13:17 UTC |