Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to open and read that file and then verify the space , if the space is less than 4 Gig , then I need to modify the file by putting a flag next to that line somthing like a warning message:Server: win1 ID: D: Space: 6496911360 Server: ux22 ID: D: Space: 7973826560 Server: del2 ID: U: Space: 7973228544
How do I compare space, and modify it within the file , I need to skip the one above 4 Gig?open (INPUT, "data") || die "couldn't open the file!"; foreach $line (<INPUT>) { ($SERVER, $Drive, $SPACE) = split(/:/,$line); } close(INPUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: compare size
by holli (Abbot) on Feb 15, 2006 at 19:43 UTC | |
|
Re: compare size
by GrandFather (Saint) on Feb 15, 2006 at 19:48 UTC | |
|
Re: compare size
by ikegami (Patriarch) on Feb 15, 2006 at 19:25 UTC | |
|
Re: compare size
by Roy Johnson (Monsignor) on Feb 15, 2006 at 19:30 UTC |