Loose Moose has asked for the wisdom of the Perl Monks concerning the following question:
How can I do this so that it works properly for each substitution ??if ($$imageMap =~ /name=(.*?)_DIAGLINK/){ $diagId = $1; $dbh = ConnectDB($User, $Password); $sql = "SELECT version FROM diagramversion WHERE diagram_id='$ +diagId' AND workflow_state='Stored'"; #to_char(version,'099') didn't + work $sth = RunJobDB($dbh, $sql); @version = $sth->fetchrow_array; $version = $version[0]; $sth->finish(); DisconnectDB($dbh); $version = sprintf( "%03d", $version ); $fullId = $diagId."-".$version; $$imageMap =~ s/ViewObject.pl\?name=(.*?)_DIAGLINK/dia_View.pl +?diagram_id=$fullId/i; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multiple substitutions
by IndyZ (Friar) on Apr 10, 2002 at 05:12 UTC | |
by RMGir (Prior) on Apr 10, 2002 at 11:40 UTC | |
by IndyZ (Friar) on Apr 10, 2002 at 16:20 UTC | |
|
Re: multiple substitutions
by belg4mit (Prior) on Apr 10, 2002 at 05:05 UTC |