coldy has asked for the wisdom of the Perl Monks concerning the following question:
I get a syntax error at line 10 near }. For some reason it does not like the use of $_. Any suggestions? Thanks.#! /usr/bin/perl -w use strict; my @allowed = split '', 'abcdefghijklmno'; my %testHash; @testHash{@arg}=(); my @test = split '', 'acbbedfydaccd'; die "Unknown char! \n" unless exists $testHash{$_} for (@test); print "success!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: checking array elements aginst another array
by holli (Abbot) on May 08, 2009 at 09:50 UTC | |
|
Re: checking array elements aginst another array
by johngg (Canon) on May 08, 2009 at 10:36 UTC | |
|
Re: checking array elements aginst another array
by jethro (Monsignor) on May 08, 2009 at 09:47 UTC | |
|
Re: checking array elements aginst another array
by jettero (Monsignor) on May 08, 2009 at 10:05 UTC | |
|
Re: checking array elements aginst another array
by Anonymous Monk on May 08, 2009 at 09:37 UTC | |
by AnomalousMonk (Archbishop) on May 08, 2009 at 12:28 UTC | |
|
Re: checking array elements aginst another array
by targetsmart (Curate) on May 08, 2009 at 09:37 UTC | |
|
Re: checking array elements aginst another array
by Marshall (Canon) on May 08, 2009 at 14:17 UTC | |
|
Re: checking array elements aginst another array
by bichonfrise74 (Vicar) on May 08, 2009 at 22:35 UTC |