##
sub my_print
{ if(UNIVERSAL::isa($_[0], 'GLOB' ))
{ my( $fh, $text)= @_;
print $fh "my", $text;
}
else
{ print "my", $text; }
}
####
#!/bin/perl -w
use strict;
my $s="toto";
my $n="3";
append( $s, "one");
append( $n, 1);
print "s: $s n: $n\n";
sub append
{ if( $_[1]=~ /^\d+$/) { &append_nb; }
else { &append_string; }
}
sub append_string
{ $_[0] .= $_[1]; }
sub append_nb
{ $_[0] += $_[1]; }