#!/usr/bin/perl use strict; use warnings; my @array = qw(1 2 cat dog 1.3 7.2); for (@array) { if (/\./) { $_*=2; next; } if (/\d/) { $_*=4; next; } } continue { print; }
Of course TIMTOWTDI and I'm trying to come up with a contrived example.
In reply to Re^3: while(){}continue{}; Useful?
by kennethk
in thread while(){}continue{}; Useful?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |