Re: retreive numbers from alpha-numeric string

2008-09-17 Thread Alan C
On Tue, Sep 16, 2008 at 8:28 AM, cancer [EMAIL PROTECTED] wrote: Hi, I am using Perl on Linux server. I m writing a code which will tell us the Linux distro with version. For this the command is cat /etc/issue which is common for all the distributions of linux. Slackware :-) [EMAIL

Re: retreive numbers from alpha-numeric string

2008-09-17 Thread sisyphus
On Sep 17, 1:28 am, [EMAIL PROTECTED] (Cancer) wrote: Hi,  I am using Perl on Linux server. I m writing a code which will tell us the Linux distro with version. For this the command is cat /etc/issue which is common for all the distributions of linux. But the output varies for different

retreive numbers from alpha-numeric string

2008-09-16 Thread cancer
Hi, I am using Perl on Linux server. I m writing a code which will tell us the Linux distro with version. For this the command is cat /etc/issue which is common for all the distributions of linux. But the output varies for different distributions. For e.g. SUSE Welcome to openSUSE 11.0

Re: retreive numbers from alpha-numeric string

2008-09-16 Thread Mr. Shawn H. Corey
On Tue, 2008-09-16 at 08:28 -0700, cancer wrote: Hi, I am using Perl on Linux server. I m writing a code which will tell us the Linux distro with version. For this the command is cat /etc/issue which is common for all the distributions of linux. But the output varies for different

Ability to do numeric and alpha sort in one pass on data which is compirsed of both

2007-08-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
or alpha is in positions 1 to 10 and when numeric can be all ten # Would like to do a true numeric sort on the numbers and alpha sort on the alpha # 075991200 000 prod 440.32 033870148 Y Y 0148 0964844694000 prod 065.56 000420001 Y Y 0001

Re: Ability to do numeric and alpha sort in one pass on data which is compirsed of both

2007-08-14 Thread Chas Owens
On 8/14/07, Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] wrote: I am attempting to sort data which has a combination of both numeric and alpah numeric data. Now it would not be so bad, but the numeric data can be either 9 or 10 characters in length and no leading zero

Re: Ability to do numeric and alpha sort in one pass on data which is compirsed of both

2007-08-14 Thread Martin Barth
Hi there, http://search.cpan.org/~sburke/Sort-Naturally-1.02/lib/Sort/Naturally.pm HTH, martin. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Ability to do numeric and alpha sort in one pass on data which is compirsed of both

2007-08-14 Thread Jay Savage
haven't told us the relative value of letters vs. numbers. I'll assume you want numbers to sort lower than alphas and that your test data isn't representative. That said, your logic will look something like this: return -1 if $a is numeric and $b is alpha return 1 if $a is alpha and $b is numeric

Re: Ability to do numeric and alpha sort in one pass on data which is compirsed of both

2007-08-14 Thread Chris Charley
- Original Message - From: Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] Newsgroups: perl.beginners To: beginners@perl.org Sent: Tuesday, August 14, 2007 1:06 PM Subject: Ability to do numeric and alpha sort in one pass on data which is compirsed of both I

Any Perl graphing libraries with alpha blending?

2007-01-14 Thread Daniel Kasak
I'm after a Perl graphing library that includes alpha blending support. I've checked out GD::Graph, but it *doesn't* support alpha blending. Are there any options? I know of jpgraph for PHP ( which is excellent for open-source stuff, but the commercial license is too expensive ). -- Daniel

Re: Any Perl graphing libraries with alpha blending?

2007-01-14 Thread Dr.Ruud
Daniel Kasak schreef: I'm after a Perl graphing library that includes alpha blending support. I've checked out GD::Graph, but it *doesn't* support alpha blending. Are there any options? I know of jpgraph for PHP ( which is excellent for open-source stuff, but the commercial license is too

Re: Any Perl graphing libraries with alpha blending?

2007-01-14 Thread Tom Smith
Dr.Ruud wrote: Daniel Kasak schreef: I'm after a Perl graphing library that includes alpha blending support. I've checked out GD::Graph, but it *doesn't* support alpha blending. Are there any options? I know of jpgraph for PHP ( which is excellent for open-source stuff, but the commercial

GD::Graph and alpha blending

2006-12-17 Thread Daniel Kasak
Hi all. I've been considering moving our graphing functionality to GD::Graph. I haven't used it at all yet. I read at http://tools.devchannel.org/devtoolschannel/04/04/13/1429242.shtml?tid=29tid=46 that you can do alpha blending ( which is a requirement ), but I haven't been able to find any

Re: Running Perl from Java (WAS: print Greek small letter alpha in html)

2006-06-15 Thread Mr. Shawn H. Corey
On Thu, 2006-15-06 at 05:01 +, may sandi wrote: Hi, Does anybody know how can run a perl file from java? I already tried with following command: try { Runtime r = Runtime.getRuntime(); String cmdLine[] = { /usr/bin/perl,c:/link41a/linkparser2.pl}; Is PERL.EXE really in a

Re: Running Perl from Java (WAS: print Greek small letter alpha in html)

2006-06-15 Thread Mr. Shawn H. Corey
On Thu, 2006-15-06 at 08:20 -0400, Mr. Shawn H. Corey wrote: BTW, change the Subject when you change the subject. Better yet, start a new thread. -- __END__ Just my 0.0002 million dollars worth, --- Shawn For the things we have to learn before we can do them, we learn by doing them.

print Greek small letter alpha in html

2006-06-14 Thread Ken Perl
hi, To print Greek small letter alpha in a html page, I tried to print this in perl but not work, #03B1; could someone give me some clue how to make this work? -- perl -e 'print unpack(u,62V5N\FME;G\!EFQ`9VUA:6PN8V]M\[EMAIL PROTECTED] )' -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: print Greek small letter alpha in html

2006-06-14 Thread Mr. Shawn H. Corey
On Thu, 2006-15-06 at 10:04 +0800, Ken Perl wrote: hi, To print Greek small letter alpha in a html page, I tried to print this in perl but not work, #03B1; could someone give me some clue how to make this work? Yes ... I think so. How about: #x03b1; -- __END__ Just my 0.0002

Re: print Greek small letter alpha in html

2006-06-14 Thread may sandi
Hi, Does anybody know how can run a perl file from java? I already tried with following command: try { Runtime r = Runtime.getRuntime(); String cmdLine[] = { /usr/bin/perl,c:/link41a/linkparser2.pl}; r.exec(cmdLine); But, I doesn't work. Currently I am using jdk 1.4. thanks in

RE: num to alpha

2006-02-27 Thread Timothy Johnson
number.\n; } -Original Message- From: The Ghost [mailto:[EMAIL PROTECTED] Sent: Sunday, February 26, 2006 10:28 PM To: Perl Beginners Subject: num to alpha What's the easiest way for me to turn a number into a letter? 2 - b 5 - e 26 - z 27 - error

RE: num to alpha

2006-02-27 Thread Keenan, Greg John (Greg)** CTR **
my %convert = qw[ 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i 10 j 11 k 12 l 13 m 14 n 15 o 16 p 17 q 18 r 19 s 20 t 21 u 22 v 23 w 24 x 25 y 26 z ]; Hi, I know John Krahn is a fan of %map. He has advised me on using it before. Just wondering if there was any reason he chose to use %convert instead

Re: num to alpha

2006-02-27 Thread John W. Krahn
Timothy Johnson wrote: Just for the sake of one more way to do it: ### use strict; use warnings; my %numbers; my $letter = 'a'; my $userinput = 23; foreach(1..26){ $numbers{$_} = $letter; $letter++; } Or: my %numbers; @numbers{ 1 .. 26 } = 'a'

Re: num to alpha

2006-02-27 Thread John W. Krahn
Keenan, Greg John (Greg)** CTR ** wrote: my %convert = qw[ 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i 10 j 11 k 12 l 13 m 14 n 15 o 16 p 17 q 18 r 19 s 20 t 21 u 22 v 23 w 24 x 25 y 26 z ]; Hi, Hello, I know John Krahn is a fan of %map. I am? He has advised me on using it before. Just

RE: num to alpha

2006-02-27 Thread Keenan, Greg John (Greg)** CTR **
I know John Krahn is a fan of %map. I am? He has advised me on using it before. Just wondering if there was any reason he chose to use %convert instead in his example above. %map and %convert are just hash names, you can use any name that you want. Sorry - my mistake. Still trying to

Re: num to alpha

2006-02-27 Thread John W. Krahn
Keenan, Greg John (Greg)** CTR ** wrote: I know John Krahn is a fan of %map. I am? He has advised me on using it before. Just wondering if there was any reason he chose to use %convert instead in his example above. %map and %convert are just hash names, you can use any name that you want.

num to alpha

2006-02-26 Thread The Ghost
What's the easiest way for me to turn a number into a letter? 2 - b 5 - e 26 - z 27 - error -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

[:alpha:]

2005-09-09 Thread Gergely Buday
Hi there, why my regex does not work as I expect? I would like to match the lines consisting of only letters, at least one of them: #!/usr/bin/perl while (STDIN) { if (/^[:alpha:]+$/) { print; } } It seems that my perl (5.8.something) does not understand

Re: [:alpha:]

2005-09-09 Thread Jeff 'japhy' Pinyan
On Sep 9, Gergely Buday said: while (STDIN) { if (/^[:alpha:]+$/) { print; } } It seems that my perl (5.8.something) does not understand the [:alpha:] posix syntax. '[:alpha:]' belongs *in* a character class, it is not a character class. if (/^[[:alpha

Insert delimiter between number and alpha

2002-02-07 Thread Frank Newland
All, My input looks like this == 5544#1341343BORIS 6200#321BOWSER 89232652#6213VERONICA === I want to put a delimiter (#) between the rightmost number and the left most alpha Resulting in 5544#1341343#BORIS 6200#321#BOWSER 89232652#6213#VERONICA

RE: Insert delimiter between number and alpha

2002-02-07 Thread Nikola Janceski
and alpha All, My input looks like this == 5544#1341343BORIS 6200#321BOWSER 89232652#6213VERONICA === I want to put a delimiter (#) between the rightmost number and the left most alpha Resulting in 5544#1341343#BORIS 6200#321#BOWSER 89232652#6213

Re: Insert delimiter between number and alpha

2002-02-07 Thread Frank
On Thu, Feb 07, 2002 at 11:27:53AM -0600, Frank wrote: All, My input looks like this == 5544#1341343BORIS 6200#321BOWSER 89232652#6213VERONICA === I want to put a delimiter (#) between the rightmost number and the left most alpha Resulting

Re: Insert delimiter between number and alpha

2002-02-07 Thread Jeff 'japhy' Pinyan
On Feb 7, Frank Newland said: I want to put a delimiter (#) between the rightmost number and the left most alpha s/(\d)([^\W\d])/$1#$2/; You can't just say (\d)(\w), because \w INCLUDES \d. You could write something like (\d)(?!\d)(\w), which requires that the \w character after the \d

Re: Pattern Matching - Remove Alpha

2002-01-18 Thread Michael Fowler
On Wed, Jan 16, 2002 at 09:51:45PM -0500, Tanton Gibbs wrote: Michael brings up a good point...for this problem, you would probably be better served by tr $stat =~ tr/a-zA-Z//d; will delete any alpha character. Although split will do the job, I think tr would be a more idiomatic

Pattern Matching - Remove Alpha

2002-01-16 Thread Hewlett Pickens
I am unable to use split with pattern matching to remove alpha characters from a string and will appreciate a pointer on what I'm doing wrong. (Have looked in Learning Perl and Programming Perl but can't spot my error.) The detail: $stat is a string that has alpha and numeric data in it. I

RE: Pattern Matching - Remove Alpha

2002-01-16 Thread Wagner-David
PROTECTED] Subject: Pattern Matching - Remove Alpha I am unable to use split with pattern matching to remove alpha characters from a string and will appreciate a pointer on what I'm doing wrong. (Have looked in Learning Perl and Programming Perl but can't spot my error.) The detail: $stat

Re: Pattern Matching - Remove Alpha

2002-01-16 Thread Michael Fowler
On Wed, Jan 16, 2002 at 05:38:56PM -0600, Hewlett Pickens wrote: The detail: $stat is a string that has alpha and numeric data in it. I want to remove all of the alpha and put the numeric data into an array. The first attempt: my @nums = split(/a-zA-Z/,$stat); # removes all data

Re: Pattern Matching - Remove Alpha

2002-01-16 Thread John W. Krahn
Hewlett Pickens wrote: I am unable to use split with pattern matching to remove alpha characters from a string and will appreciate a pointer on what I'm doing wrong. (Have looked in Learning Perl and Programming Perl but can't spot my error.) The detail: $stat is a string that has

Sending script from WIndows to Dec Alpha Environment and NOT working

2001-12-12 Thread Wagner-David
Sorry, but I am not sure what to do. I have sent a script to an individual which works fine on my pc (w2k), but when run on dec/alpha setup fails. I assume it has to do with end of line, but unsure what to do? I sent as a straight attachment. The script was renamed on the other