> if ( ( $hash -> { $paragraph } ) =~ 
> s/###(\w+.*\.jpg)###/($text_link)/ ) {
>   $figure_name = $1;
> 
>   $text_link = $cgi -> a({-href => "javascript: 
> window.open('$pix_dir/$figure_name'," 
>                                  . " '', "
>                                  . " 'status=yes, "
>                                  . "  resizable=yes, "
>                                  . "  scrollbars=no, "
>                                  . "  width=530,"
>                                  . "  height=380'"
>                                  . ");
>                                    void('');"
>                            }, "Fig $figure_number" );
>                         
>   $figure_number++;
> }

You could just match (instead of substituting), which would still set $1
for you in the if condition, and then do the substitution inside the if,
after $text_link is actually defined.

 -dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to