in reply to if fooled by pesky leading white space
It's not if, it's eq; the string "abc" is not equal to " abc" (computers are quite pedantic that way). If stripping white space is causing problems elsewhere then create a stripped copy and compare that instead.
( my $staff_last_clean = $staff[ $i * 3 + $staff_last ] ) =~ s/^\s+//; if( $staff_last_clean eq $names[ 0 ] ) { # ... }
That'll leave the original untouched for elsewhere.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
---|
In Section
Seekers of Perl Wisdom