sub hello (_) {say "Hello, ", @_ ? $_[0] : $_} hello "world"; my $_ = "mars"; hello; { my $_ = "earth"; hello; } hello; __END__ Hello, world Hello, mars Hello, earth Hello, mars
In reply to Re^9: How can I avoid code repetition here
by JavaFan
in thread How can I avoid code repetition here
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |