> Steve Bertrand wrote:
>> > Steve Bertrand wrote:
>> > > I got it...
>> > >
>> > > for my $item (@clean) {
>> > > if (! grep ($_ eq $item, @array)) {
>> > > push (@array, $item);
>> > > print "$item\n";
>> > > }
>> > > }
>> >
>> > FWIW, this is a FAQ
Steve Bertrand wrote:
> > Steve Bertrand wrote:
> > > I got it...
> > >
> > > for my $item (@clean) {
> > > if (! grep ($_ eq $item, @array)) {
> > > push (@array, $item);
> > > print "$item\n";
> > > }
> > > }
> >
> > FWIW, this is a FAQ (see "perl
> Steve Bertrand wrote:
>> I got it...
>>
>> for my $item (@clean) {
>> if (! grep ($_ eq $item, @array)) {
>> push (@array, $item);
>> print "$item\n";
>> }
>> }
>
> FWIW, this is a FAQ (see "perldoc -q duplicate"). If the array
> elements can
> be c
Steve Bertrand wrote:
> I got it...
>
> for my $item (@clean) {
> if (! grep ($_ eq $item, @array)) {
> push (@array, $item);
> print "$item\n";
> }
> }
FWIW, this is a FAQ (see "perldoc -q duplicate"). If the array elements can
be compared with str
> Hi all,
>
> I am practicing using grep, but have a problem. Instead of directly
> building an array in a traditional format with grep:
>
> @array = (grep $_, @input);
>
> I want to push items into a new array that DO NOT appear within the
> current array being grepped for. Hence:
>
> use strict;
Hi all,
I am practicing using grep, but have a problem. Instead of directly
building an array in a traditional format with grep:
@array = (grep $_, @input);
I want to push items into a new array that DO NOT appear within the
current array being grepped for. Hence:
use strict;
my @array = ();
m