Hey guys, I just wrote this tiny piece of code
#!/usr/bin/perl use warnings; use strict; my @array=(10,20,30,40); print: "Before: @array \n"; for(@array){$_*=2;} print"After: @array\n";
And I'm getting an error:Useless use of string in void context at line 6. And only the second print is actually being printed. It's probably something right in front of my eyes but I just can't seem to figure it out!
In reply to Please help by samaniac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |