On Dec 4, 7:19 am, [EMAIL PROTECTED] (Yitzle) wrote: > On 12/4/07, sivasakthi <[EMAIL PROTECTED]> wrote: > > > How to assign the javascript variable to perl variable?? > > You don't? > What are you trying to do? Are you outputting Javascript with Perl? > Just print the variable's value. > > $var = 5; > print "Variable = $var\n";
That only works for numbers. For general values use Data::JavaScript; my $var = 5; print jsdump('Variable', $var); This actually prints: var Variable = 5; The good thing is that it also does something sane if you had said: my $var = { Foo => [1,2,3], Bar=> [5,6] }; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/