Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #
- # Perl script for filtering twitter follower data
- #
- open(FILE, $ARGV[0]);
- open(FILER,">","data.new");
- $high = 0;
- @file = <FILE>;
- foreach $line (@file)
- {
- @stuff = split(/\s+/,$line);
- chomp($stuff[1]);
- $stuff[1] =~ s/,//g;
- if($stuff[1] >= $high){ $high = $stuff[1]; }
- print FILER "$stuff[0] $high\n";
- undef(@stuff);
- }
- close(FILER);
- close(FILE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement