in reply to lower case multiple strings

my split statement actually goes more like this:
($s1, $s2, $s3, $mon, ... , $sun) = split (/ /);
so $_ puts in too much information. I tried something like:
($s1,$s2, $s3, $mon, $tue, $wed, $thu, $fri, $sat, $sun) = split (/ /) +; $alldays = ($mon, $tue, $wed, $thu, $fri, $sat, $sun); $alldays2 = lc($alldays); print "$alldays2\n";
which I think is quite long-winded but for some reason my output is just $fri.

Replies are listed 'Best First'.
Re: Re: lower case multiple strings
by lemming (Priest) on Sep 28, 2001 at 22:01 UTC

    You might want to look at the join function

    join EXPR,LIST
    Joins the separate strings of LIST into a single string with fields separated by the value of EXPR, and returns that new string. Example:

    $rec = join(':', $login,$passwd,$uid,$gid,$gcos,$home,$shell);
    Beware that unlike "split", "join" doesn't take a pattern as its first argument. Compare the split entry elsewhere in this document.