/ Published in: Perl

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl use strict; use warnings; my %products; while (<INPUT>) { #initialize a hash of arrays keyed by product, with an array of all filenames for that product if (m/ (\w*?)_.*sql/) { my $product = $1; if (m/ (${product}_02.*?sql)$/) { } } } #print the largest element of the array for each product }
Comments
