undef %saw;
WTF?
@saw{@in} = (); #why? @saw not $saw, @saw is array or
hash?<===============
@out = sort keys %saw; # remove sort if undesired
Do you need lumber?
undef @ary;
@ary[@in] = @in; #why? @saw not $saw<===============
I don't mean to be disrespectful here but are you suffering from some
mental problem that cuases you to repeat "@saw not $saw" ad infinitum? I
tried saying that repeatedly and did not do anything for me. What does it
do for you?
Please read the posting guidelines posted here frequently for advice on
how to help others help you. First, make sure to always put
use strict;
use warnings;
in your scripts. With that:
use strict;
use warnings;
undef %saw;
@saw{@in} = ();
@out = sort keys %saw;
undef @ary;
@ary[@in] = @in;
@out = grep {defined} @ary;
__END__
generates the following messages:
C:\Documents and Settings\asu1\My Documents> t.pl
Global symbol "%saw" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 4.
Global symbol "%saw" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 6.
Global symbol "@in" requires explicit package name at C:\Documents and
Settings\
asu1\My Documents\t.pl line 6.
Global symbol "@out" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 7.
Global symbol "%saw" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 7.
Global symbol "@ary" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 10.
Global symbol "@ary" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 11.
Global symbol "@in" requires explicit package name at C:\Documents and
Settings\
asu1\My Documents\t.pl line 11.
Global symbol "@in" requires explicit package name at C:\Documents and
Settings\
asu1\My Documents\t.pl line 11.
Global symbol "@out" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 12.
Global symbol "@ary" requires explicit package name at C:\Documents and
Settings
\asu1\My Documents\t.pl line 12.
Execution of C:\Documents and Settings\asu1\My Documents\t.pl aborted due
to com
pilation errors.
What are you trying to do?
Sinan