Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi-variables, same output..

Status
Not open for further replies.

blitzer

Programmer
Jun 18, 2001
34
CA
how would I do this?

$var1 & $var2 = "on";

the above gives me an error..
 
Or, more readably:

$var1 = "on";
$var2 = "on"; ______________________________________________________________________
Perfection in engineering does not happen when there is nothing more to add.
Rather it happens when there is nothing more to take away.
 
TIMTOWTDI

($var1,$var2) = ('on','on');

But I doubt anyone would want to do it that way. :)
 
Or an even simpler way :)
($var1, $var2) = "The captain of the Exxon Valdez was a moron" =~ m/Exx(\w+).+mor(\w+)/;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top