in reply to Re: loop to remove negatives
in thread loop to remove negatives
BluGeni, I strongly recommend putting your values into an array, then using
(or, more idiomatically, s/-//g for @busi;) instead of working with the variables as independent scalars - any time you have a series of variables named $foo1, $foo2,..., that's a pretty strong indication that what you really want is an array.for (@busi) { $_ =~ s/-//g; }
If you need help getting these values into an array, just show us the code that you're currently using to assign their values and we can show you how to modify it to use an array instead.
|
|---|