in reply to problem with multi-line
Here is the code I have written
What I want to do is find a line that starts with a '.' and put the alphanumeric in the scalar $titi, than scan the next line to match the alphanumeric and put it in scalar $toto. But it is generating an error and cannot use it. This is just a rial code I wrote for the actual program, but as this part isn't functioning right I cannot add it to the other code. Thanking you for your help.#!/usr/local/bin/perl -w # analyse_map.perl # Open map files (map_merc and rom.dld) open(MAP, ") { if( ($titi, $toto) = /^\.(\w+).*$\t+\.\w+\W+(\w+).*$/m) { print($titi, $toto, "\n"); } } close(MAP);
S. Navalkar
-- Casey
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: REPOST problem with multi-line
by cwest (Friar) on Aug 25, 2000 at 16:48 UTC | |
|
RE: Re: REPOST problem with multi-line
by Jouke (Curate) on Aug 25, 2000 at 16:51 UTC |