I am trying to pass a random number into an Flash Actionscript using the following simple script.
$r is being passed as literally '$r' rather than the random value.
If I just call the script in a browser, the correct value is printed.
If I substitute $r for a text string, the text string is passed.
Can anyone suggest a solution?
Up until this, my Monday was going so well.
Keith
Code:
#!perl
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use strict;
use warnings;
use CGI;
print "Content-type: text/html\n\n";
my $r=int(rand(3))+1;
print "&picture=[red]$r[/red]&";
If I just call the script in a browser, the correct value is printed.
If I substitute $r for a text string, the text string is passed.
Can anyone suggest a solution?
Up until this, my Monday was going so well.
Keith