>> I am trying to figure out how to use grep in a particular situation.
>> The line is:
>>
>> next unless grep ($fromdevice, @sitenamekeys);
JJ> next unless grep $fromdevice =~ /$_/, @sitenamekeys;
> "JJ" == Jones, Jennifer writes:
JJ> I have a question to John's response. T
I have a question to John's response.
The code works if the condition is met but responds with "Can't "next" outside
a loop block at" when it does not.
Can someone please explain why?
Thanks,
Jen
Noah wrote:
> Hi there,
Hello,
> I am trying to figure out how to use grep in a particular si
Noah wrote:
Hi there,
Hello,
I am trying to figure out how to use grep in a particular situation.
The line is:
next unless grep ($fromdevice, @sitenamekeys);
but I am not quite matching properly.
@sitenamekeys = /ABC DEF GHI/;
and $fromdevice could be something like "device1.abc" or "dev
On 10-09-14 11:23 AM, Noah wrote:
Hi there,
I am trying to figure out how to use grep in a particular situation.
The line is:
next unless grep ($fromdevice, @sitenamekeys);
but I am not quite matching properly.
@sitenamekeys = /ABC DEF GHI/;
and $fromdevice could be something like "device1.
Hi Noah,
On Tuesday 14 September 2010 17:23:09 Noah wrote:
> Hi there,
>
> I am trying to figure out how to use grep in a particular situation.
> The line is:
>
> next unless grep ($fromdevice, @sitenamekeys);
>
>
> but I am not quite matching properly.
>
> @sitenamekeys = /ABC DEF G