reg ex problem

2006-06-27 Thread Ryan Moszynski
i have this string extracted from a text file i'm writing a program to process: test_freq = 1.0001; and i have to extract the "1.0001" i can't count on the whitspace being where it now is. I would like to change this line of perl $getTestFRQ =~ s/\D+//g; so that instead of killing all no

Re: reg ex problem

2006-06-27 Thread Ryan Moszynski
thanks for the help, that did the trick On 6/27/06, Ryan Moszynski <[EMAIL PROTECTED]> wrote: i have this string extracted from a text file i'm writing a program to process: test_freq = 1.0001; and i have to extract the "1.0001" i can't count on the whitspace

iterate over newlines

2006-07-05 Thread Ryan Moszynski
this is a snippet of a file i'm trying to process: ### iotests ( WriteEmUp [create:openwr:write:close] ReadEmUp [openrd:read:close] ) i need my perl regex to recognize "iotests", then make anything that matches ".[.]" into a string. I can't count o

Re: iterate over newlines

2006-07-05 Thread Ryan Moszynski
i really hope thats overkill for my problem. I have my program finshed, this is the last condition i have to deal with. Also, my supervisor would prefer me not to use any nonstandard modules. On 7/5/06, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 7/5/06, Ryan Moszynski <[EMAIL PROTECTE

Re: beginners Digest 6 Jul 2006 08:41:28 -0000 Issue 2890

2006-07-06 Thread Ryan Moszynski
rg Date: Thu, 06 Jul 2006 00:03:27 +0100 Subject: Re: iterate over newlines Ryan Moszynski wrote: Hi Ryan > this is a snippet of a file i'm trying to process: > ### > > iotests ( > WriteEmUp [create:openwr:write:close] > ReadEmUp [openrd:read:close] &g

Re: iterate over newlines

2006-07-06 Thread Ryan Moszynski
sorry for the resend, i made a mistake in the subject line and didn't want anyone folling the thread to miss the resolution. -- Forwarded message -- From: Ryan Moszynski <[EMAIL PROTECTED]> Date: Jul 6, 2006 1:57 PM Subject: Re: beginners Digest 6 Jul 2006 08:41:28

processing a hash of a hash of a hash

2006-07-06 Thread Ryan Moszynski
I am trying to print out a hash of a hash of a hash table(with code chunk 1), but I keep getting the following error: Use of uninitialized value in hash element at ./clearwhite.pl line 522. I don't understand where this error is coming from since I can process a hash of a hash just fine, using

regex repetition

2006-07-12 Thread Ryan Moszynski
I need to write some code to allow users to specify which of a whole bunch of elements(e.g.512/1024) that they want to view. My idea for how to do this was to have them input a semicolon delimited list, for example: 1-10;25;33;100-250 i tried using this to check to make sure they input a valid

awesome help, but, a question

2006-07-14 Thread Ryan Moszynski
Mumia, thanks for your work on answering my help request. I really appreciate it. However, while your solution works perfectly in your sample program, since I am new to perl, I am having trouble understanding some of the techniques you used, and i am having trouble integrating the solution that

passing a list as a variable

2006-07-24 Thread Ryan Moszynski
Is there a way to make my commented 'foreach" line act the same as the line above it? Can I pass a list as a variable as I am trying to do, or doesn't perl support that? ### #!/usr/bin/perl -w $|=1; #use strict; system "clear"; my @array = 1024; my $list4 = "0..10,33..43,100..111";

Re: passing a list as a variable

2006-07-24 Thread Ryan Moszynski
# Argument "0..15,33..43,100..111" isn't numeric in array element ### i guess a better question is, can I ?cast? that string into a variable that can be recognized by the foreach? On 7/24/06, Joshua Colson <[EMAIL PROTECTED]> wrote: On Mon, 2006-07-24 at 12:40 -0400, Ryan Mos

Re: passing a list as a variable

2006-07-24 Thread Ryan Moszynski
thanks guys. Dr. Ruud's solution does the trick. I was trying to get around having to do that, but i guess you can't have everything. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

saving system output as $

2006-07-26 Thread Ryan Moszynski
is there a way to save the output of a system call as a variable to print later and suppress the initial printing of the output of the call to the terminal?? ### my $keepStat; $keepStat = system "stat $inputScratch"; ## I DON"T WANT THIS TO PRINT #

perl default variable question

2007-09-18 Thread Ryan Moszynski
hi, i'm using a perl script i found to change the names of batches of files. The program works as is but it's giving me a weird warning. I'm familiar with $_, but not $_[3]. Can someone explain what $_[3] is, and how i can get this script to stop throwning the warning? Thanks, Ryan i found the

Re: perl default variable question

2007-09-18 Thread Ryan Moszynski
On 9/18/07, Ryan Moszynski <[EMAIL PROTECTED]> wrote: > thanks, > > so i can just test to see if $_[3] > > exists > > and it kills the warning. > > On 9/18/07, Andrew Curry <[EMAIL PROTECTED]> wrote: > > @_ is the list of incoming parameters to a sub

socket client, can't print w/o newline

2007-11-26 Thread Ryan Moszynski
first off, i apologize if i'm not describing this as succinctly as possible. i'm working on some client/server stuff using sockets, and i grabbed some code from the net that i don't totally understand. i'm passing packed messages back and forth over a socket from the client/server. Right now i h