Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $filename="test.txt"; my $template_data = "unsecure/".$filename; open(DATA_IN, ">>$template_data") || print "Can't open output file1: $ +template_data\n"; #binmode DATA_IN; undef $/; $_ = <DATA_IN>; if($_=~/<\?--([^-]*)-([^-]*)-->(.*?)<\/\?--\1-\2-->/sg) { }
<?--1-1--> Location 2 </?--1-1--> <?--1-2--> Location 2 </?--1-2--> <?--3-1--> Location 2 </?--3-1--> <?--4-1--> Location 2 </?--4-1--> <?--4-2--> Location 2 </?--4-2-->
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding item in a text file
by Aristotle (Chancellor) on Oct 18, 2002 at 20:39 UTC | |
by Anonymous Monk on Oct 18, 2002 at 20:46 UTC | |
by Aristotle (Chancellor) on Oct 18, 2002 at 20:59 UTC | |
|
Re: Finding item in a text file
by graff (Chancellor) on Oct 18, 2002 at 23:40 UTC |