singho has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; my ($fred, $barney); sub max { print "You are using the subroutine max"; if ( $fred gt $barney ) { $fred; } else { $barney; } } my $n = &max(10, 15); print "$n";
the error i get is
Use of uninitialized value in string gt at learningperl4.pl line 10.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: learning perl chapter 4
by davido (Cardinal) on Jan 03, 2013 at 04:46 UTC | |
by singho (Novice) on Jan 03, 2013 at 06:19 UTC | |
|
Re: learning perl chapter 4
by AnomalousMonk (Archbishop) on Jan 03, 2013 at 06:36 UTC |