in reply to Passing values to use under _DATA_ token
The "Data start\n" marker is so that the first DATA test has something to read.my $url1 = $cgi->param('url1'); my $url2 = $cgi->param('url2'); if (<DATA>) { while (<DATA>) { # blah } } else { open (my $fh, '>>', $0) or die "Unable to open $0: $!"; print $fh "Data start\n$url1\n$url2\n"; close $fh; exec $0 } __DATA__
|
|---|