Perl: Variables
In Perl, we need not decalare a varibale type. Meaning a variable can hold both a string or a number. All the variables in perl are preceded by a $ sign as follows: $name="david"; Again, just perl does not care about the type, you can simply reassign it to a number: $name=0; You can perform operations now: $name++; Perl can accept numbers as strings and perform arithmetic operations:
#!/usr/local/bin/perl $name='99'; $name++; print $name;
The above program would give 100 as the output. Variables in perl are case-sensitve and therefore, $name and $Name are different. Variable name can consist of numbers, letters and underscores. It should not start with a number.

Recent comments
24 weeks 13 hours ago
24 weeks 4 days ago
24 weeks 4 days ago
25 weeks 24 min ago
25 weeks 4 days ago
27 weeks 5 days ago
30 weeks 5 days ago
33 weeks 4 days ago
34 weeks 2 days ago
35 weeks 1 day ago