partymeeple has asked for the wisdom of the Perl Monks concerning the following question:
a humble dead-set newbie looks for sandles to kiss...
the if statement in the while loop is fooled by white space that apears infron of some of the array elements after they have been passed though the web server. i tried stripping these but it broke other parts of my code.
what's a newbie freindly way to ignore white space in the array elements my if??
the if statement in the while loop is fooled by white space that apears infron of some of the array elements after they have been passed though the web server. i tried stripping these but it broke other parts of my code.
what's a newbie freindly way to ignore white space in the array elements my if??
$i=0; my $lic_number; while ($staff[$i*3]){ if (($staff[$i*3+$staff_last] eq $names[0]) && ($staff[$i*3+$staff +_first] eq $names[1])){ do some stuff... last; } $i++; }
your humble novice,
meeple (who is comming to terms with the limitations of the llama book.. i think i need a camel)
beware the farmers.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: if fooled by pesky leading white space
by GrandFather (Saint) on Jul 14, 2008 at 03:50 UTC | |
by partymeeple (Novice) on Jul 14, 2008 at 04:17 UTC | |
by planetscape (Chancellor) on Jul 14, 2008 at 06:39 UTC | |
Re: if fooled by pesky leading white space
by Fletch (Bishop) on Jul 14, 2008 at 03:37 UTC | |
Re: if fooled by pesky leading white space
by Grey Fox (Chaplain) on Jul 14, 2008 at 16:18 UTC | |
by partymeeple (Novice) on Jul 15, 2008 at 03:31 UTC |
Back to
Seekers of Perl Wisdom