Perl Simple Variable Declaration

 

Hello,

The following script will explain you how to declare a variable in perl language. All you need is to declare with “$” symbol.

 

#!/usr/bin/perl -w
# Variable declaration in perl

$name = "Siranjeevi";

print "$name\n";

#END

The output of the above perl script will be

Siranjeevi

Leave a Reply

Protected by WP Anti Spam