|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
He means logic like:
This (untested) script should just print the values 0 through 5 in order. The $key value is just the data you use to tell whether it's identical or not. When you first check the %seen hash for the value 0, there won't be an entry for zero, so the print will execute. The line also increments the value in the %seen hash to 1, so the next time you see 0 it *won't* print. You just need the %seen hash, the data you use for the $key, and an action you want to control. ...roboticus When your only tool is a hammer, all problems look like your thumb. In reply to Re^3: correct angle on tackling a problem
by roboticus
|
|