I try the code and name the perl program as ami.pl . Im running this perl script on windows 7 and I already installed active perl on my pc. Seems like nothing happened in csv file.
---------- Post updated at 03:15 AM ---------- Previous update was at 03:10 AM ----------
Is there any conflict or problem if I run the given code on windows?
$ perl -e 'my $total=0; while (<>) { chomp; my $value = (split /([,:])/)[2]; $total=$value+$total; }print $total/$.' fps.csv
but still can't work. I place my fps.csv and ami.pl in one folder at my dekstop. Once I click ami.pl it will just pop out and nothing happened in fps.csv. I try to add break; at the end of the code but still the .pl file close automtically.
C:\Users\mhamzah2\Desktop\media decode project>perl -F':|,' -lane '$sum+=$F[1];$
count++}{print $sum/$count' fps.csv.
''' is not recognized as an internal or external command,
operable program or batch file.
I'm using windows 7.
---------- Post updated at 05:04 AM ---------- Previous update was at 04:54 AM ----------
Itkamaraj
Any idea why I cannot execute my pl command using pl script? How to do this operation in many csv file ex: fps1.csv, fps2. csv and etc..and the average result will be also written in each csv file after the command being execute.
Anybody can look what is the problem with this code.
perl -e "my $total=0; while (<>) { chomp; my $value = (split /([,:])/)[2]; $total=$value+$total; open FILE, ">", "ami.txt" or die $! }print FILE $total/$." fps.csv
I got perl -e The system cannot find the patch specified