pglenski has asked for the wisdom of the Perl Monks concerning the following question:
syntax error at 3.pl line 5, near "%tmp{" syntax error at 3.pl line 7, near "}" Execution of 3.pl aborted due to compilation errors.
#!/usr/bin/perl sub unique { my $self=shift; my %tmp; map { %tmp{$_}=1 } @_; return keys %tmp; } @array = qw(apples cheeries apples bananas apples); $o->unique(@array);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: compile errors
by tirwhan (Abbot) on Feb 24, 2006 at 23:23 UTC | |
|
Re: compile errors
by InfiniteSilence (Curate) on Feb 24, 2006 at 23:31 UTC | |
|
Re: compile errors
by ayrnieu (Beadle) on Feb 25, 2006 at 01:05 UTC | |
by jonadab (Parson) on Feb 25, 2006 at 14:16 UTC |