>>>>> "CS" == Curt Shaffer <cshaf...@gmail.com> writes:
URI> still no warnings and strict. USE THEM. >> >> do it now. add them and declare all your variables. it will save your >> ass. >> CS> I am running -w when I run the code. >> URI> what is the \ doing there. it makes the space into a space. it is not >> seen by split or the regex engine. CS> This is the ONLY way I can get the ID=x value. I tried both your CS> example and many others. They all produced a single character, not CS> the complete value. This is producing the exact result. So CS> obviously something is using it. post the output line from that command. do not let your emailer mung it or word wrap it. show the part you want to extract out. there may be easier ways to get it with a regex and not with split. URI> use named variables and not $_ whenever you can. it makes for better >> code and it is easier to follow. there are cases where $_ must be used >> and some places where it is good but names are better in general CS> I'm getting 5 values and I need to do something different with CS> each of them. I believe that is when $_ is helpful as each CS> iteration through the loop will be a different value. It seems to CS> be to be a shorter way and relatively clean to do in this CS> instance. If there is a better way , please enlighten me. no, you are missing the point. the loop variable needs a name. all loop variables are reused, hence the need of a loop!! but what kind of value is stored there in $_? we can't tell quickly without analyzing the loop code and seeing where the data comes from. whereas with a properly named loop variable, we know what it is all the time inside the loop. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/