Perl Simple Variable Declaration



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";


The output of the above perl script will be


Leave a Reply

Protected by WP Anti Spam