Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Redirection problem / question

by Anonymous Monk
on Apr 30, 2015 at 02:04 UTC ( #1125193=note: print w/replies, xml ) Need Help??

in reply to Re: Redirection problem / question
in thread Redirection problem / question

#!/usr/bin/perl -- use strict; use warnings; use Net::CIDR qw/ cidr2octets /; while(<STDIN>){ s{\s+$}{}; ## trim print "$_\n" for cidr2octets( $_ ); } __END__ $ echo dead::beef::/46 | perl dead:beef:0000 dead:beef:0001 dead:beef:0002 dead:beef:0003

Replies are listed 'Best First'.
Re^3: Redirection problem / question
by taint (Chaplain) on Apr 30, 2015 at 07:09 UTC
    Firstly; allow me to apologize for my seeming incoherent replies. But as I noted in the OP, the script(s) I'm currently using to help automate the process, must be responded to, anywhere from 60 - 90 seconds. So it makes it extremely difficult carry out a thought process, let alone, type them in a box. It plays hell, when trying to coordinate a group of routines for a Perl script. Hence my plea for help.

    While I'm extremely grateful for the solution @anonymous, I must admit I'm also a bit disappointed. As I had hoped to solve it with your earlier hints. But not that disappointed! :)


    Here's what I've used

    #!/usr/bin/perl -w use Modern::Perl; use Net::CIDR qw/ cidr2octets /; while(<STDIN>){ s{\s+$}{}; print "$_\n" for cidr2octets($_); } __END__
    Which allows me to
    $ < packed-cidr > unpacked-cidr
    Once again, I'm really grateful for your taking the time to respond with the illusive logic I was seeking. This is all part of a much larger process, and this missing piece of the puzzle was just what I needed to put it all together. I'll post it all here, when I've completed it. As I suspect others will also gain from it.

    Thanks again!

    λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1125193]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2022-07-04 00:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found