Home  |  Linux  | Mysql  | PHP  | XML
From:Uri Guttman Date:Fri Feb  5 15:41:14 2010
Subject:Re: 1-line text file with numbers, need to add to them
>>>>> "F" == Frank <caichao1103@gmail.com> writes:

F> #!/usr/bin/perl
F> open(DATA,"data.txt");
F> while(<DATA>) {
F> $number=$_;
F> # print $number;
F> while ($number =~ /([0-9]+)~s/g){
F> printf ("%d\n","$1");
F> }
F> }
F> close(DATA);

regardless of the poor code there and others have commented on it, why
did you post this three different times? and once using a different
address.

and please don't post code like that. it breaks many standard perl
coding rules, and it doesn't even do anything close to what the OP
wanted.

uri

--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: 1-line datafile, need data for another routine
Re: Simple cgi email
module installation
Re: module installation
sequential value check



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants