ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
Why does this work?
by Barry Brevik other posts by this author
May 20 2008 3:51PM messages near this date
RE: Resources for reading MS Visio with Win32::OLE | Re: Why does this work?
OK, I've stumped myself. I wanted to assign 0 to several variables,
except for a single variable that should be set to 1.

Before I knew what I was doing I whipped this code into my editor:
 
  ($frow = $ax = $bx = $cx = 0)++;
 
...and it works as I expected. That is, all of the variables are set to
0 except $frow which is 1.

Now I'm afraid that it might not always work because I don't understand
why it works in the first case. Anyone want to suggest if this is stable
code or not?

Barry Brevik

_______________________________________________
ActivePerl mailing list
ActivePerl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Barry Brevik
Casteele/ShadowLord
Jenda Krynicky

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved