RE: interesting question about variables

2002-03-15 Thread David Gray
> 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, " >

Re: interesting question about variables

2002-03-15 Thread Jenda Krynicky
From: [EMAIL PROTECTED] (Martin A. Hansen) > i have a loop containing the following block of code. however, first > time the loop is run, $text_link is empty, which it shouldn't be. i > cant move the declaration of $text_link above the if statment, because > then the $figure_nam

Re: interesting question about variables

2002-03-15 Thread Jonathan E. Paton
> if ( ( $hash -> { $paragraph } ) =~ > s/###(\w+.*\.jpg)###/($text_link)/ ) { Obviously you ain't using warnings or strict if $text_link has any chance of being undefined. Also, you should have a else clause, looking something like: else { undef $test_link; } Jonathan Paton _