$schds{ lc( ( split( /\s+/, $_ ) )[0] ) } = 1 while <MILF>;
With this snippet, split within the parenthesis provides a list that you can index into with a subscript (in this case, [0]. Then the first element is passed into lc, whos return value is used as the hash key for the hash named %schds.
Dave
In reply to Re: split giving warning
by davido
in thread split giving warning
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |