Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Corrupt Data?

by massa (Hermit)
on Jul 15, 2008 at 00:11 UTC ( [id://697600]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @mac_addrs = ("0015FAA3F03A", "0015FAA3F03B", "0015FAA3F03C");
    
    ...
    }
    
    print "$_\n" for convert(@mac_addrs);
    
  2. or download this
    $ perl -le '@a = (2, 3, 4, 5); @b = map { 2 * $_ } @a; print for @b'
    4
    6
    8
    10
    
  3. or download this
    $ perl -le '@a = (2, 3, 4, 5); @b = map { $_ % 2 ? () : ($_, $_ / 2) }
    + @a; print for @b'
    2
    1
    4
    2
    
  4. or download this
    $ perl -le '@mac_addrs = ("0015FAA3F03A", "0015FAA3F03B", "0015FAA3F03
    +C"); @a = map { lc $_ } @mac_addrs; print for @a'
    0015faa3f03a
    0015faa3f03b
    0015faa3f03c
    
  5. or download this
    $ perl -le '@mac_addrs = ("0015FAA3F03A", "0015FAA3F03B", "0015FAA3F03
    +C"); @a = map { unpack "(A4)*", lc $_ } @mac_addrs; print for @a'
    0015
    ...
    0015
    faa3
    f03c
    
  6. or download this
    $ perl -le '@mac_addrs = ("0015FAA3F03A", "0015FAA3F03B", "0015FAA3F03
    +C"); @a = map { join ".", unpack "(A4)*", lc $_ } @mac_addrs; print f
    +or @a'
    0015.faa3.f03a
    0015.faa3.f03b
    0015.faa3.f03c
    
  7. or download this
    @mac_addrs = ("0015FAA3F03A", "0015FAA3F03B", "0015FAA3F03C"); @a = ma
    +p { "AP" . join ".", unpack "(A4)*", lc $_ } @mac_addrs; print for @a
    +'
    AP0015.faa3.f03a
    AP0015.faa3.f03b
    AP0015.faa3.f03c
    
  8. or download this
    $ perl -le '
    > use strict;
    ...
    AP0015.faa3.f03a
    AP0015.faa3.f03b
    AP0015.faa3.f03c
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found