Problem is this is a 1gb file and when I watch the memory utilization it is chewing up 4gb and growing. I don't understand how perl is using so much memory just by loading the file into an array.
Keith -----Original Message----- From: Wagner, David --- Senior Programmer Analyst --- CFS [mailto:david.wag...@fedex.com] Sent: Thursday, July 16, 2009 1:46 PM To: Patrick K Christopher TANAGER; beginners@perl.org Subject: RE: While issues > -----Original Message----- > From: Patrick K Christopher TANAGER > [mailto:pchristop...@tanagerinc.com] > Sent: Thursday, July 16, 2009 11:39 > To: beginners@perl.org > Subject: While issues > > I can't seem to find this oddness in this script. > #! /usr/bin/perl You should use strict and warnings as part of the processing and you might have a better idea. Also you should really have the code that is failing and not just making the assumption that the code is the same as the first. If you have any questions and/or problems, please let me know. Thanks. Wags ;) David R. Wagner Senior Programmer Analyst FedEx Freight Systems 1.719.484.2097 Tel 1.719.484.2419 Fax 1.408.623.5963 Cell http://fedex.com/us > > open(FH,"<$ARGV[0]") || die ("File failed to open!\n"); > open(FO,">$ARGV[1]") || die ("Output failed to open!\n"); > while (<FH>){ > > s/,//g > > print (FO); > } > > close (FH); > close (FO); > > open(FH1,"$ARGV[2]")..... > > > > The problem is the first while iterates properly but then the > script just exits. > > > Any ideas ? > > > Thanks, > Keith > > This message contains confidential information and is > intended only for the individual named. If you are not the > named addressee you should not disseminate, distribute or > copy this email. Please notify the sender immediately by > e-mail if you have received this e-mail by mistake and delete > this e-mail from your system. E-mail transmission cannot be > guaranteed to be secure or error-free as information could be > intercepted, corrupted, lost, destroyed, arrive late, or > incomplete, or contain viruses. The sender therefore does > not accept liability for any errors or omissions in the > contents of this message, which arise as a result of e-mail > transmission. If verification is required, please request a > hard-copy version. > > Tanager, INC > 3140 West Ward Road > Suite 205 > Dunkirk, MD 20754 > www.tanagerinc.com > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late, or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. Tanager, INC 3140 West Ward Road Suite 205 Dunkirk, MD 20754 www.tanagerinc.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/