Google News
logo
Perl - Interview Questions
Comment on data types and variables in Perl.
Perl variables do not have a data type. The data type of a variable in Perl is inferred from its value.
 
A variable in Perl can be defined as follows :
$x = 10;
$base_str = ‘Hello’;
Value needs to be assigned to a variable before using it. Without this, the program may result in an unexpected output.
Advertisement