Features/Perl5Debugger: ExSewi.pm
| File ExSewi.pm, 427 bytes (added by bowtie, 18 months ago) |
|---|
| Line | |
|---|---|
| 1 | package ExSewi; |
| 2 | |
| 3 | use 5.010; |
| 4 | use strict; |
| 5 | use warnings; |
| 6 | |
| 7 | our $VERSION = '0.01'; |
| 8 | |
| 9 | use base 'Exporter'; |
| 10 | our @EXPORT_OK = qw(wh eh); |
| 11 | |
| 12 | sub wh { |
| 13 | |
| 14 | my $fred = 'bloggs two'; |
| 15 | |
| 16 | #bp 19-20 this is 18 |
| 17 | say 'running wh'; |
| 18 | say $_[0]; |
| 19 | |
| 20 | $_ = "He's out bowling with Barney tonight."; |
| 21 | s/Barney/Fred/; # Replace Barney with Fred |
| 22 | s/\w+$/($`!)$&/; |
| 23 | say $_; |
| 24 | |
| 25 | return; |
| 26 | } |
| 27 | |
| 28 | sub eh { |
| 29 | my $fred = $_[0]; |
| 30 | $_[0] = 'not fred'; |
| 31 | say $fred; |
| 32 | return; |
| 33 | } |
| 34 | |
| 35 | 1; |
