Here is the Desired output:Date: Tuesday, August 14, 2001 01:57 PM Nasty website: <A HREF="http://www.fde.com/myaccount/mymail.asp?eID= a1542199776964498e">http://www.fde.com/myaccount/mymail.asp?eID=a15219 +897 76964498e</A> Date: Tue, 14 Aug 01 03:53:06 Pacific Daylight Time <div align=left><FONT face=verdana size=1>To change or remove your sub +scription click here -- <a href="<A HREF="http://www.fde.com/myaccount/mymail.as +p?eID =a1542189776964498e">http://www.fde.com/myaccount/mymail.asp?eID=a1521 +989 776964498e</A>">
And last but not least, here is the Code.Date: Tuesday, August 14, 2001 01:57 PM http://www.fde.com/myaccount/mymail.asp?eID=a15421989776964498e Date: Tue, 14 Aug 01 03:53:06 Pacific Daylight Time http://www.fde.com/myaccount/mymail.asp? eID=a15421989776964498e
As always, any advice will be much appreciated. Peace, amearse#!/usr/bin/perl -w use strict; # What file to use my $goober = "rfl.txt"; # Open File and pop it into an array open GOOB, $goober or die "Can't open $goober"; my @goob=<GOOB>; close(GOOB); # Make a flag to prevent dupes and start loop my $flag = 0; foreach (@goob) { if (/Date:/){ #grab and print the date print; $flag = 0; } if (s#(http://[\w./=\?-]+)#<A HREF=\"$1\">$1</A>#sgi and !$flag an +d (/myaccount/)) { # grab the url print; $flag = 1; } }
In reply to Help getting desired output by amearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |