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);
In reply to compile errors by pglenski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |