Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: While Loops

by blue_cowdawg (Monsignor)
on Jan 08, 2013 at 19:02 UTC ( #1012313=note: print w/replies, xml ) Need Help??


in reply to Re: While Loops
in thread While Loops

#!/usr/bin/perl -w use strict; my @data=(); my $file='c:\text.txt'; my $count=0; open FILE,"< $file" or die "$file: $!"; while (my $line =<FILE> ){ chomp $line; push @data,[split /\t/,$line]; $count++; next if $count < 99; while ($#data >= 0 ) { printf "%s\n",join(",",shift @data); } $count = 0; }
So.. how much more of your homework do you need me to do?


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012313]
help
Chatterbox?
[marioroy]: ah, ok. I searched the web for 17" laptop. Computer Shopper is still around. Did not know that.
[1nickt]: I miss the days when you could customize every aspect of your PC on the Dell site.
[1nickt]: Or, just build one. (Actually I built a gaming PC for my son last year just like in the old days!)
[stevieb]: I remember the days where a consumer was allowed to have independent thought and choice too

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-03-26 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.