Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: lower case multiple strings

by arturo (Vicar)
on Sep 27, 2001 at 23:58 UTC ( [id://115229]=note: print w/replies, xml ) Need Help??


in reply to lower case multiple strings

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

$alldays = lc $_;
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.

perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://115229]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2024-04-18 16:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found