taint has asked for the wisdom of the Perl Monks concerning the following question:
I realize the above is quite simplistic. But I'm afraid I really need some help in this area. What would be good logic to grep patterns correctly to arrive at a efficient conditional?if (!$input) {print $form; }else{ if $input (d.d.d.d) $input=>$ip; }else{ if $input (valid.domain.name) $input=>$domain; }else{ print $form; }
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.5"; print $perl_version;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to best filter/direct data based on input structure?
by Kenosis (Priest) on Nov 02, 2013 at 03:13 UTC | |
by taint (Chaplain) on Nov 02, 2013 at 03:49 UTC | |
by Kenosis (Priest) on Nov 02, 2013 at 04:18 UTC | |
by taint (Chaplain) on Nov 02, 2013 at 04:42 UTC | |
by taint (Chaplain) on Nov 02, 2013 at 06:45 UTC | |
|
Re: How to best filter/direct data based on input structure?
by LanX (Saint) on Nov 02, 2013 at 02:05 UTC |