in reply to Can anyone tell me what is the error in this script
You need to start all your homework assignments with these lines in your file:
Start with something that you know will work in your file. Something like:#!/usr/bin/perl use warnings; use strict;
Change one thing at a time and then run the script. Make sure you understand and correct any errors before adding anything else. Check your syntax frequently by running: "perldoc -f function"#!/usr/bin/perl use warnings; use strict; print "This is a test\n";
If a piece of code compiles under warnings and strict but doesn't do what you want try adding print statments liberally in your code to check the values of your variables.
|
|---|