Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: lower case multiple stringsby arturo (Vicar) |
on Sep 27, 2001 at 23:58 UTC ( [id://115229]=note: print w/replies, xml ) | Need Help?? |
you want to process a number of things? Think foreach or map. You want to turn a bunch of things into a string with a common delimiter? Think join. But I'm not sure what you want to do: it looks like you start out with a (possibly mixed-case) string in $_ and want an all lower-case *string* ($alldays is a scalar) out, in which case oughta do you. But supposing you want that array for whatever reason: my $alldays = join " ", map { lc $_ } ($mon, $tue, $wed, $thu, $fri, $sat, $sun); the map lowercases each of the elements of the array, and the join puts a space in between each member of that array.
In Section
Seekers of Perl Wisdom
|
|