Bomba keypad
[mirrors/Programs.git] / perl / crawler / r.pl
CommitLineData
21c4e167
H
1#!/usr/bin/env perl
2use strict;
3use warnings;
4
5package WebCrawler;
6
7sub uniq(\@) {
8 my ($i) = @_;
9 my %h;
10 @h{@$i} = ();
11 @$i = keys %h;
12 return(@$i);
13}
14
15sub unique(\@) {
16 my ($i) = @_;
17 my %h;
18 @$i = grep(!$h{$_}++, @$i);
19 return(@$i);
20}
21
22my @b = qw(b b c c c a a d);
23print "@b\n";
24unique(@b);
25print "@b\n";
This page took 0.142671 seconds and 4 git commands to generate.