#!/usr/bin/perl -w
use strict;
use warnings FATAL => 'all';
while (<>) {
# ./Customer_Name/Feed_#/Weeklyusage.html.htm
$_ =~ m/\/(.*)\/(.*)\/.*htm/;
my $name = $1;
my $feed = $2;
print "name: $name, feed: $feed\n";
}the (.*) are for capturing data, which get put into $1, $2, etc. So you wind up with the data you want in the named variables. while (<>) means 'loop through standard input'.
-Bill
---- Bill McGonigle, Owner Work: 603.448.4440 BFC Computing, LLC Home: 603.448.1668 [EMAIL PROTECTED] Cell: 603.252.2606 http://www.bfccomputing.com/ Text: [EMAIL PROTECTED] AIM: wpmcgonigle Skype: bill_mcgonigle
_______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
