in reply to Re: How to best filter/direct data based on input structure?
in thread How to best filter/direct data based on input structure?

@Kenosis;
I can't thank you enough Kenosis, for your kind words, and informative reply.
Your suggested solution is perfect. I'm not usually so dense. But after working, and tackling the hard parts first. My mind sometimes has a hard time sorting out the easy stuff -- it tends to make it really complicated. :/
Anyway, I can't thank you enough for indulging me. As I know it probably wasn't really hard for most ppl. I just somehow made it that way.
Thanks again.

--Chris

#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.5";
print $perl_version;
  • Comment on Re^2: How to best filter/direct data based on input structure?

Replies are listed 'Best First'.
Re^3: How to best filter/direct data based on input structure?
by Kenosis (Priest) on Nov 02, 2013 at 04:18 UTC

    You're most welcome, Chris! Am glad it worked for you.

    My mind sometimes has a hard time sorting out the easy stuff -- it tends to make it really complicated.

    Well, then, we have one more thing in common--besides Perl...

      LOL! That's refreshing to hear. I'm glad to know I'm not the only one. :)

      --Chris

      #!/usr/bin/perl -Tw
      use perl::always;
      my $perl_version = "5.12.5";
      print $perl_version;
        FWIW for other onlookers that this thread might attract...
        It should be noted that, in order filter out only valid IP addresses;
        one needs to modify the RE above:
        # FROM my $results = ( $input =~ /$RE{net}{IPv4}/ or is_domain($input) ) ? $i +nput : $form; # TO my $results = ( $input =~ /^$RE{net}{IPv4}$/ or is_domain($input) ) ? +$input : $form;
        Take note of the additional anchor(s) in the second line.
        Difference being; in the first line, the filter is an RE for any-and-all-digits && only-digits-3-or-less-in-length. While the second filters for: <=3-in-length && <=255-in-size.

        HTH

        --Chris

        #!/usr/bin/perl -Tw
        use perl::always;
        my $perl_version = "5.12.5";
        print $perl_version;