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
6 days 19 hours ago
2 weeks 4 days ago
4 weeks 3 hours ago
4 weeks 2 days ago
4 weeks 3 days ago
4 weeks 5 days ago
29 weeks 1 day ago
29 weeks 4 days ago
29 weeks 4 days ago
30 weeks 11 hours ago