Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

johnirl's scratchpad

by johnirl (Monk)
on Jun 05, 2004 at 04:04 UTC ( [id://361349]=scratchpad: print w/replies, xml ) Need Help??

Thanks Browser
#!/usr/bin/perl use strict; use Data::Dumper; my @harray = ( "Size", "Buffer Size", "Value", "Size", "Buffer Size", "Value", "Size", "Buffer Size", "Value" ); my @OneHead = ("Size", "Buffer Size" ); my %seen = map { $_ => 0 } @OneHead; my @results = grep { /(\w+)/; my $s = $1; !exists $seen{$s} or ($seen{$s}++ < 1); } @harray; local $" = $/; print "@results\n"; OUTPUT: ------ @result = ("Size", "Buffer Size", "Value", "Value", "value");

j o h n i r l .

Sum day soon I'Il lern how 2 spelI (nad tYpe)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found