#!/usr/bin/perl use strict; use warnings; my $example = Example->new; $example->print( map { chomp $_; $_; } <STDIN> ); $example->print('That\'s all!'); sub Example::new { my ($class, $start_num) = @_; bless \$start_num, $class; } sub Example::print { my $self = shift; print ++$$self, ": $_\n" for @_; }
In reply to Re: Functions in Perl
by Gunth
in thread Functions in Perl
by bluethundr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |