Thank you! I appreciate the help. Code works great now! I just had to modify and add the "g" at the end
[CODE=perl]$filesize =~ s/,//g;[/CODE]
So now it looks like
[CODE=perl]#!/usr/bin/perl
open (ALBERT_LAB, "Lab3.txt") or die ("Cannot open file");
while(<ALBERT_L AB>)
{
chomp;
($date, $time, $ampm, $filesize, $filename) = split("...
User Profile
Collapse
-
Excuse my ignorance but I literally started learning Perl 2 days ago just for this one assignment I have to do and I have no idea about your comment?
Are you saying I need to remove a specific comma from my code? or the comma from the line of code you gave me?
secondly, I dunno if I'm supposed to replace a certain line of code with the code you gave me or if I'm supposed to add it to the lab?
Sorry, I'm trying...Leave a comment:
-
My average
I'm trying to figure this out but my $average is not calculating right.
My $filesize is supposed to add into my $totalFileSize after every iteration. Then $totalFileSize is supposed to be divided by $count and that NUMBER is supposed to equal $average.
Here is my code and the output I get.
-----------------------------------------------------------
Code:#!/usr/bin/perl open (ALBERT_LAB, "Lab3.txt")
No activity results to display
Show More
Leave a comment: