in reply to Re: Multiple choice from text file to SQL
in thread Multiple Line Data from text file to SQL
Thanks for your advice and sorry for posting something already asked. The post you referenced in your reply was very helpful. But some darkness remains in my DBA's brain.
Here is the code I've done:
#!/usr/bin/perl $file = "data.txt"; open (INPUT, "< $file"); undef $/; my $string = <INPUT>; $string =~ s/\n//g; while ($string =~ /A\)(.*?)B\)/g) { print "<a>".$1."</a>\n"; } close (INPUT);
This prints out all the occurrences of the A)... as expected
Thanks again for your precious knowledge.
P.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multiple choice from text file to SQL
by kennethk (Abbot) on Mar 03, 2009 at 21:24 UTC |