Hello,
I guess that one can write in more perlish fashion that I did:
the part between the #### of this script to pack the array @array.
Please, can someone give me some hint ?
#!/usr/bin/perl
# pack_array.pl
use strict;
use warnings;
my $string = "[EMAIL PROTECTED] n??e#w [?! \$ \% y]e{?]a##r? 2\*0\$0'\"6\# !
\^";
my @array = split / /, $string;
foreach (@array) {
s/[EMAIL PROTECTED]"^'"\]\[\*{]//g;
}
####################################
my @pack;
my $j = 0;
foreach my $i (0..$#array) {
if ($array[$i] eq '') {
$i++;
} else {
$pack[$j] = $array[$i];
$j++;
}
}
#####################################
print "@pack\n";
__END__
tia
--
Gérard
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>