Challenge: Make Variables
Practice declaring various Perl variables such as integer character boolean and float and output their values using print. Understand basic variable types essential for Perl programming.
We'll cover the following...
We'll cover the following...
Problem Statement
- Declare an int type variable and name it
intNumberand assign it a value of 1000. - Declare a char type variable and name it
charNameand assign it a value of N. - Declare a boolean type variable and name it
boolAcceptand assign it a value of 1. - Declare a float type variable and name it
floatNumand assign it a value of 10.292.
Now output these values on the console using the print function in Perl. The values should be separated by a comma.
Output
1000, N, 1, 10.292
Before jumping onto the solution, give it a try first: