Re: Check if a given function returns something

2008-02-27 Thread Jeff Pang
On Wed, Feb 27, 2008 at 3:59 PM, vijay krishna [EMAIL PROTECTED] wrote: the sub routine function in turn uses many other function. Some of these functions have a return statement and some do not. The caller doesn't care about what were enclosed in that function. I need only the last

Re: How to read from keyboard?

2008-02-27 Thread Chas. Owens
On Wed, Feb 27, 2008 at 9:04 AM, obdulio santana [EMAIL PROTECTED] wrote: Hi. I want to read from keyboard some keys [pagedown], [Home],[End][PageUp][up][left][down][right]. how can I do it? Thanks in advance. Take a look at Term::GetKey. *

How to read from keyboard?

2008-02-27 Thread obdulio santana
Hi. I want to read from keyboard some keys [pagedown], [Home],[End][PageUp][up][left][down][right]. how can I do it? Thanks in advance.

Re: array question

2008-02-27 Thread Rob Dixon
Paul Lalli wrote: On Feb 26, 11:07 am, [EMAIL PROTECTED] (Irfan Sayed) wrote: Hello All, I have two arrays contains exact no. of elements. Now what I need to do is , I want to execute certain commands to each elements of the array at a time. It means that I want take first element of first

Re: How to read from keyboard?

2008-02-27 Thread MK
On 02/27/2008 09:04:50 AM, obdulio santana wrote: - Hi. - - I want to read from keyboard some keys [pagedown], - [Home],[End][PageUp][up][left][down][right]. - - how can I do it? - - Thanks in advance. - - Term::Readkey also works but is poorly documented. Does anyone know how to use the hex

Re: How to read from keyboard?

2008-02-27 Thread obdulio santana
2008/2/27, MK [EMAIL PROTECTED]: On 02/27/2008 09:04:50 AM, obdulio santana wrote: - Hi. - - I want to read from keyboard some keys [pagedown], - [Home],[End][PageUp][up][left][down][right]. - - how can I do it? - - Thanks in advance. - - Term::Readkey also works but is poorly

Expression Help

2008-02-27 Thread Joseph L. Casale
I am trying to replace all occurrences of a windows path such as C:\Dir 1\Dir 2\Dir with more spaces to a similar path, and have it case insensitive, and I can't make it work. Anyone got an idea? I am hoping the syntax is compatible with Sed as my script has to be ran in two mode's, one being

Re: Expression Help

2008-02-27 Thread yitzle
How about providing the code that you are working with? This ought to work: s/C:\\Dir 1\\Dir 2\\Dir with more spaces/replacement/ __CODE__ $in = 'C:\Dir 1\Dir 2\Dir with more spaces'; $in =~ s/C:\\Dir 1\\Dir 2\\Dir with more spaces/replacement/; print $in\n; __OUTPUT__ replacement

Re: How to read from keyboard?

2008-02-27 Thread Tom Phoenix
On Wed, Feb 27, 2008 at 10:28 AM, obdulio santana [EMAIL PROTECTED] wrote: I want to read the following keys [home][End][Pageup][Page down] I think you're trying to capture an escape sequence, which is a series of characters sent for certain keystrokes. I'm appending below an example program

Re: Expression Help

2008-02-27 Thread Chas. Owens
On Wed, Feb 27, 2008 at 3:07 PM, Joseph L. Casale [EMAIL PROTECTED] wrote: I am trying to replace all occurrences of a windows path such as C:\Dir 1\Dir 2\Dir with more spaces to a similar path, and have it case insensitive, and I can't make it work. Anyone got an idea? I am hoping the

RE: Expression Help

2008-02-27 Thread Joseph L. Casale
I don't understand why you would run sed. Perl can be run from the command line by hand as well. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. Yeah, sorry should have been more clear. The server that will run the Sed based section

RE: Expression Help

2008-02-27 Thread Joseph L. Casale
How about providing the code that you are working with? This ought to work: s/C:\\Dir 1\\Dir 2\\Dir with more spaces/replacement/ __CODE__ $in = 'C:\Dir 1\Dir 2\Dir with more spaces'; $in =~ s/C:\\Dir 1\\Dir 2\\Dir with more spaces/replacement/; print $in\n; __OUTPUT__ replacement I had not

Re: Expression Help

2008-02-27 Thread yitzle
I think both in sed and perl you can use any symbols you wish to delineate the RegEx. # works, but / is traditionally used in Perl. That is to say, in Perl these two lines are the same: $in =~ s/C:\\Dir 1\\Dir 2\\Dir with more spaces/replacement/; $in =~ s#C:\\Dir 1\\Dir 2\\Dir with more

Re: How to read from keyboard?

2008-02-27 Thread MK
Okay i have the exact answer for you now. The following script will give you decimal and hexidecimal values for each keypress. The hex value can be used in normal regex and print statements using \x; the example in the script quits using capital Q and (from my keyboard) PgUp (this

Time::Piece capturing parsing problems

2008-02-27 Thread Myf White
Hi everyone, I think my question relates to STDOUT rather than Time::Piece but I'm not sure. I am trying to use Time::Piece to process and convert a string which may be a bit dodgy. What I can't understand is how to capture the problem. The following code only captures the problem with the