Re: Cheapest Method to Read Files?

2012-07-19 Thread Sheppy R
6 CPU) @ 21739.13/s (n=1) So it looks like awk was accounting for less than half of total time. Keeping it in the house and running things through perl definitely seems like the way to go here. Thanks again! On Thu, Jul 19, 2012 at 8:21 PM, Jim Gibson wrote: > > On Jul 19, 2012, at 5:10 P

Cheapest Method to Read Files?

2012-07-19 Thread Sheppy R
I'm wondering what is the least resource intensive way to read just one item of a file. I'm looking at one of two options (I'm assuming there are more that I'm just not familiar with). The first idea is to run grep through a system command. The second is to open the file for reading then scan ea

Re: extracting email addresses from a file

2011-11-29 Thread Sheppy R
Couldn't you just use the non-whitespace character to capture everything before and after the @ symbol? s/^.*\s(\S+@\S+)\s.*$/$1/

Re: regex

2011-11-04 Thread Sheppy R
This should do it - m/Cell (\d+)(.*), HEH/ On Fri, Nov 4, 2011 at 1:42 PM, Chris Stinemetz wrote: > I am trying to match a line that has HEH in it. > > I would also like to store the number follow CELL in memory variable $1 > and store everything following the number and upto excluding ", HEH"

Re: Stop the mail to me

2011-10-07 Thread Sheppy R
Stop spamming us with stop mail requests and use the instructions included at the bottom of the email to unsubscribe. To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ On Fri, Oct 7, 2011 at 6:24 AM, ganesh vigne

Re: How to run a perl script in background on Windows?

2011-08-03 Thread Sheppy R
If you are trying to run this at Startup you can set up the AutoExnt service to run a .bat that launches the .pl file. @Timothy - Sorry for the reply. On Wed, Aug 3, 2011 at 6:43 PM, timothy adigun <2teezp...@gmail.com> wrote: > Hi Jose, > If you are using ActiveState you could use wperl.exe fr

Re: memory doesn't free after lexical block

2011-05-18 Thread Sheppy R
Uri, how would you change the original code to get it to free up memory? I've run into this issue myself quite a few times. I've also seen perl consume an entire cpu core without even trying. Could you rework the original scriptlet to show how you would free the memory at the end or direct us to

Re: SDL beginner question

2011-01-21 Thread Sheppy R
I would recommend using the IRC chat or SDL mailing list found here: http://sdl.perl.org/index.html At least one of the members that is working on the development side is coding on a Mac as well (Unfortunately I don't remember the name). kthakore is generally in the IRC channel most of the time a

Re: Perl for windows Problem

2011-01-05 Thread Sheppy R
*As usual... forgot to reply to all...* Check out Sys::Info and the other Sys::Info based modules. These should do what you need. http://search.cpan.org/search?query=sys%3A%3Ainfo&mode=all On Thu, Jan 6, 2011 at 12:16 AM, sync wrote: > Hi: > > > Could I get the windows information( like CPU

Re: Increment Operators

2011-01-02 Thread Sheppy R
Sorry, forgot to reply-to-all again :( $a *= 2; Basically translates to this: $a = $a * 2; just like $b += 1; translates to: $b = $b + 1; On Sun, Jan 2, 2011 at 7:00 PM, J. S. John wrote: > Hi all, I'm new to Perl. The only other language I know is > Matlab/Octave and I'm still working my

Re: Syntax Errors

2010-12-26 Thread Sheppy R
Strawberry Perl under Padre on a Windows system will give Syntax errors (Running from both the command-line and in Padre itself). Chances are this is where Bill is getting them from, probably just one of the differences between *nix and Windows. @Bill - I'm not seeing any problems when I copy and

Re: Writing 3D games with Perl... How's the Performance?

2010-12-25 Thread Sheppy R
Going through some of the examples in this book. Does anyone know where I can find the data files used? It is my understanding that this manual is actually a work in progress, but it doesn't look like the data files have been posted on sdl.perl.org yet. @Brian, sorry for the double... forgot to

Re: Linux Uptime

2010-12-16 Thread Sheppy R
http://search.cpan.org/~burak/Sys-Info-Base-0.73/lib/Sys/Info/OS.pm#uptime Sys::Info::OS has an uptime() method. On Thu, Dec 16, 2010 at 8:32 PM, Matt wrote: > I have a perl script but I want to exit it if the uptime on the server > is less then say an hour. Any idea how I would get uptime wit

Re: Perl, pattern matching, substitution

2010-11-13 Thread Sheppy R
I've had similar issues and the \Q \E flags didn't fix it. One thing I've done to fix an issue where regex metacharacters are being caught is to do a replace on all of the characters to include a \ right in front. Something like this: open (my $FILE, "<", $file) or die "$!\n"; my @lines = <$FILE

Re: chromatic's "Modern Perl" book is out.

2010-11-12 Thread Sheppy R
Yes, follow the link, you can purchase a paper book. On Fri, Nov 12, 2010 at 5:18 PM, David Christensen < dpchr...@holgerdanske.com> wrote: > Shlomi Fish wrote: > >> chromatic's "Modern Perl" book is finally out and is available as free >> PDFs downloads: >> > > Is a book version available? > > >

Re: reading data from a file and put in a new file

2010-11-09 Thread Sheppy R
The "Global symbol "@val" requires explicit package name at test.pl ." should be fixed by declaring @val with 'my': my @val = **something**; On Tue, Nov 9, 2010 at 2:37 PM, Shlomi Fish wrote: > Hi Lynx, > > I'm CCing my reply to the list. Next time, please use the GMail "reply to > all" > featu

Re: Chomp help...

2010-11-08 Thread Sheppy R
You could try doing this with a regex: $html_content =~ s/\n//g; This would look for any new-line ("\n") and replace it with nothing. The g at the end tells it to do this globally, so all instances of \n would be removed. On Mon, Nov 8, 2010 at 4:04 PM, Bobby wrote: > Hi, > > I'm having issue