Hi Indra, a few comments on your code.
On Wednesday 16 Mar 2011 17:51:19 ind...@students.itb.ac.id wrote: > Hi, I am Indra. I am new in perl. > > I start to run my script : > *************************************************************************** > ********************** > > #!/usr/bin/perl -w > 1. Don't use "-w". 2. Add "use strict;" 3. Add "use warnings;" See: http://perl-begin.org/tutorials/bad-elements/#no-strict-and-warnings > $UNFOLD = 1; #1=UNFOLD^[$B%G!<%?$r;HMQ^[(B 1. Add my to them. 2. What are all the junk characters after the line? I cannot understand what they mean. > 0=^[$B@8^[(Bvolume^[$B%G!<%?$r;HMQ^[(B $XDR_NUM = 1; > #1=^[$BJRJ}$N$_^[(BCAPPI^[$B$r:n@.^[(B 0=^[$BN>J}$N^[(BCAPPI^[$B$r:n@.^[(B > > # work directory # > $workdir = ".."; > $datadir = "../volume"; > $year = "2011"; 1. Add my. 2. Maybe use http://perldoc.perl.org/File/Spec.html > > if(@ARGV != 1){ 1. There should be a space before the "{". > print "ARGV error \n"; > print "firstradar velx vely \n"; You should output errors STDERR - not STDOUT. Maybe use perldoc -f die instead. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Optimising Code for Speed - http://shlom.in/optimise When Chuck Norris uses Gentoo, "emerge kde" finishes in under a minute. A computer cannot afford to keep Chuck waiting for too long. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/