I think instead of /$trip/ you ought to use /\Q$trip\E/ Check out the "Quote and Quote-like Operators" section of perlop.
On Thu, 2003-07-24 at 14:57, [EMAIL PROTECTED] wrote: > I am trying to get this written for a presentation in the morning (gotta > love it when the boss dumps a pile of stuff with 3 hours left in the day) > and I have a massive file that is a flat file database (| delimited) that I > need to sort through to get all the *** entries out of. The file format is > this: > > sub Itemslist > { > $database_file = "/home/web/sales/info/salesa1"; > $trip = "***"; > open(INF,$database_file) or dienice("Can't open $database_file: $! \n"); > @grok = <INF>; > close(INF); > $file1 = "/home/web/sales/itemlist.html"; > open (FILE, ">$file1") || die "Can't write to $file1 : error $!\n"; > > print FILE "<html><head><title>*** Item List</title></head><body > bgcolor=white text=black>\n<table border=1>\n<tr><td><B>Item > Num</B></td><td><B>Description</B></td><td><B>B2</B></td><td><B>Cat > Code</B></td><td><B>Vendor Num</B></td></tr>\n"; > > foreach $i (@grok) > { > if ($i =~/$trip/) > { > chomp($i); > ($item_num,$item_desc,$b1,$b2,$b3,$b4,$cat_code,$vend_num) = > split(/\|/,$i); > print FILE > "<tr><td>$item_num</td><td>$item_desc</td><td>$b2</td><td>$cat_code</td><td> > $vend_num</td></tr>\n"; > } > } > print FILE "</table></body</html>\n"; > } > > -------------------------------------------- > > The *** I have tried to escape with \*\*\* and /\*/\*/\* > > The entries is the $item_desc that contains the *** and when it DOES find > one, it needs to print it out to the file, the others it needs to ignore. > > HELP! > > Robert > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]