Re: Newbie help

2003-07-17 Thread Paul D. Kraus
"Keith Olmstead" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > Been searching though this list for awhile now, and now I am needing some help. I am not asking for someone to do my code for me, I am trying to learn perl and the only way for me to do that is to dive staig

Assigning a singe value to a list

2003-07-17 Thread Paul D. Kraus
Is there a way to assign a single value to a list? other then doing the obvious and spelling out each list assignment or running through a loop. For instance... my ( $var1, $var2, $var3, ... ) = "Paul" assigning paul to all variables in the list. or a more useful example my ($passed1, $passed2

Re: Script's Name

2003-07-17 Thread Kristofer Hoch
--- Nigel Peck - MIS Web Design <[EMAIL PROTECTED]> wrote: > Can someone please remind a forgetful idiot how to get the name of > the script being run (the file itself)? > > Cheers, > Nigel > > MIS Web Design > http://www.miswebdesign.com/ > print "Full File name: $0\n"; Forgetfulness does not

Re: custom return value from entire script

2003-07-17 Thread david
Mark Henry wrote: > Hi All, > > Anyone know if it's possible for the return/exit value of a script, in the > event of success, to be something other than 0? > > I want to call, from a shell script, a perl script that determines a > certain > record ID from a database. When the ID has been obtai

RE: custom return value from entire script

2003-07-17 Thread wiggins
On Thu, 17 Jul 2003 17:29:49 -0400, "HENRY,MARK (HP-Roseville,ex1)" <[EMAIL PROTECTED]> wrote: > Hi All, > > Anyone know if it's possible for the return/exit value of a script, in the > event of success, to be something other than 0? > > I want

custom return value from entire script

2003-07-17 Thread HENRY,MARK (HP-Roseville,ex1)
Hi All, Anyone know if it's possible for the return/exit value of a script, in the event of success, to be something other than 0? I want to call, from a shell script, a perl script that determines a certain record ID from a database. When the ID has been obtained, the script would exit, and the

Re: Script's Name

2003-07-17 Thread Jenda Krynicky
From: "Nigel Peck - MIS Web Design" <[EMAIL PROTECTED]> > Can someone please remind a forgetful idiot how to get the name of the > script being run (the file itself)? $0 See perldoc perlvar Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes

RE: Script's Name

2003-07-17 Thread Tony Esposito
If I understand you're question correctly, you can get the basename of the script that you are running ( i.e., minus the extension ) with the code: my ($basename) = fileparse($0, '\..*'); > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900

Script's Name

2003-07-17 Thread Nigel Peck - MIS Web Design
Can someone please remind a forgetful idiot how to get the name of the script being run (the file itself)? Cheers, Nigel MIS Web Design http://www.miswebdesign.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: trying out examples in Oreilly's Perl Graphics Programming

2003-07-17 Thread Joel Lopez
I finally got the script to work!! Thanks for all your help and suggestions. http://shawn.apocabilly.org/PGP/examples/example2-1.txt I had to add the line: binmode STDOUT; right before the last line: print $image->png; A friend of mine was able to get it to work without adding t

Re: Substiuting portions of a string with elements from a hash ...

2003-07-17 Thread David Storrs
Hi Jamie, On Thu, Jul 17, 2003 at 11:46:08AM -0400, Jamie Risk wrote: > I'm trying to add HTML anchors to a lines of text. Quick example would be > to take the line: >"Search the internet using an engine like Google." > and turn it into: >"Search the internet using an engine like href="w

Re: Variable "$q" will not stay shared at

2003-07-17 Thread Kristofer Hoch
B, Please post the entire code base of envir.pl. Feel free to obfuscate any data that it requires. I cannot get the code you posted to fail. There is something amiss, and we need to see the code to help. Kristofer. --- "B. Fongo" <[EMAIL PROTECTED]> wrote: > > > Hello, > > I'm working on m

Newbie help

2003-07-17 Thread Keith Olmstead
Hello, Been searching though this list for awhile now, and now I am needing some help. I am not asking for someone to do my code for me, I am trying to learn perl and the only way for me to do that is to dive staight into it. My problem is with the theory of the script that I am trying to wri

DDL:Oracle / DDL:Pg?

2003-07-17 Thread Johnson, Shaunn
Howdy: I am running PostgreSQL 7.2.1 on RedHat Linux. I would like to get information from my tables that include index, primary keys, sequences, etc. I see that there is a module DDL:Oracle that does this, but is there one for PostgreSQL? (I'm using DBI-1.37 for most of my work). Thanks! -X

Re: trying to delete a file if >= 1 day old

2003-07-17 Thread John W. Krahn
Jenda Krynicky wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > perldoc -f -C > >-M Age of file in days when script started. > >-A Same for access time. > >-C Same for inode change time. > > > > > > In *nix files do not have a

Threading / Shared Variable Assertion

2003-07-17 Thread Phil Schaechter
Hello all, I'm having some threading issues with perl 5.8 on solaris 9 x86. This problem does not appear on linux. If anyone can provide any hints, I would be eternally thankful. Here's some background: SunOS load5.**.com 5.9 Generic_112234-05 i86pc i386 i86pc bash-2.05# perl --version

Re: trying to delete a file if >= 1 day old

2003-07-17 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > perldoc -f -C >-M Age of file in days when script started. >-A Same for access time. >-C Same for inode change time. > > > In *nix files do not have a creation time. You probably want to us

chomp'ing EOL

2003-07-17 Thread Jamie Risk
I've no control over the EOL of text files that I'm processing; is there a conveniant method using chomp() and the INPUT_RECORD_SEPERATOR ($/) to handle DOS/UNIX/MAC generated text files automatically? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: help me out please ..

2003-07-17 Thread zentara
On 17 Jul 2003 08:23:54 -, [EMAIL PROTECTED] (Vemulakonda Uday Bhaskar) wrote: >i am tring to tranfer files between two linux systems through >sftop > >i have installed the following modules : > >1. Download Net::FTP and Install >2. Download Net::SFTP . > >and the error displayed afte

Re: secure socket connection

2003-07-17 Thread zentara
On Thu, 17 Jul 2003 05:12:16 +, [EMAIL PROTECTED] (Mario Kulka) wrote: >I'm trying to set up credit card processing and one of the first steps is to >establish a "secure socket connection" - how can i do it? (My host does >support it) You are not clear which part of the credit card processi

RE: trying to delete a file if >= 1 day old

2003-07-17 Thread Tony Esposito
Thank you for your input. I have found a resolution to this issue. > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] > -Original Message- From: John W. Krahn [ma

Re: trying to delete a file if >= 1 day old

2003-07-17 Thread John W. Krahn
Tony Esposito wrote: > > Fellow Perl neophytes ( and non-neophytes), Hello, > I need a little clarification. I am trying to remove files that are > greater that 24 hours old. The code snippet below is in a 'while' loop that > steps through a directory, yet it seems not to work - no fil

RE: fast match count of char in string

2003-07-17 Thread Charles K. Clarkson
Juerg Oehler [mailto:[EMAIL PROTECTED] wrote: : Sent: Thursday, July 17, 2003 11:09 AM : To: [EMAIL PROTECTED] : Subject: fast match count of char in string : : : hi, : : how do efficent count char 'a' in string "abdaatela" ? Plagiarizing from perlfaq4: "How can I count the number of oc

fast match count of char in string

2003-07-17 Thread Juerg Oehler
hi, how do efficent count char 'a' in string "abdaatela" ? i guess there are better solutions than: $tmpstr =~ s/[^a]//g ; $cnt = length ($tmpstr) ; print ("found <$cnt> a's <$tmpstr>\n"); thanx george -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

RE: trying to delete a file if >= 1 day old

2003-07-17 Thread Tony Esposito
Good points - thanks for your feedback. > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] > -Original Message- From: Wagner, David --- Senior Programmer Analyst -

RE: trying to delete a file if >= 1 day old

2003-07-17 Thread Tony Esposito
Thank you, Bob. Very helpful information on all fronts. > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] > -Original Message- From: Bob Showalter [mailto:[EMAIL

RE: trying to delete a file if >= 1 day old

2003-07-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Tony Esposito wrote: > Fellow Perl neophytes ( and non-neophytes), > I need a little clarification. I am trying to remove files that are > greater that 24 hours old. The code snippet below is in a 'while' > loop that steps through a directory, yet it seems not to work - no > files are remov

RE: Padding a record with zero's in a file

2003-07-17 Thread Charles K. Clarkson
James Parsons <[EMAIL PROTECTED]> wrote: : I have a following in a file : : Raw data = : 18822 188.22 : 133 1.33 : 230023.00 : 222003 `2220.03 : : : And when I run the following perl script the : total is extremely out of wacky, total should : be

RE: trying to delete a file if >= 1 day old

2003-07-17 Thread Bob Showalter
Tony Esposito wrote: > Fellow Perl neophytes ( and non-neophytes), > I need a little clarification. I am trying to remove files that are > greater that 24 hours old. The code snippet below is in a 'while' > loop that steps through a directory, yet it seems not to work - no > files are remov

Re: Problems With SFTP Subsytem Errors (was: help me out please)

2003-07-17 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > On 17 Jul 2003 08:23:54 -, "vemulakonda uday bhaskar" > <[EMAIL PROTECTED]> wrote: > > > > > hi all, > > > > i am tring to tranfer files between two linux systems through > > sftop > > Please use a more descriptive su

Re: newbie : obtain gid of the current user

2003-07-17 Thread John W. Krahn
Sylvain masnada wrote: > > Hi again and thx John for you help. > > > > You could run id inside your perl program. > > > > my $id_output = qx/id/; > I didn't know how to execute a shell command into a perl script, thx. There are many ways to execute a "shell command" in a perl program, that is jus

trying to delete a file if >= 1 day old

2003-07-17 Thread Tony Esposito
Fellow Perl neophytes ( and non-neophytes), I need a little clarification. I am trying to remove files that are greater that 24 hours old. The code snippet below is in a 'while' loop that steps through a directory, yet it seems not to work - no files are removed no matter what their 'age'

Re: Creating html source ...

2003-07-17 Thread Rob Dixon
Jamie Risk wrote: > er, sorry. > > Is there a module to produce html formatted output? If so, would I > be directed to some documentation? > > > > I have to assume that any of the simple HTML-izing I want to do > > > with simple text files has already been done. I'm guessing > > > modules, particu

RE: Padding a record with zero's in a file

2003-07-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
James Parsons wrote: > Hi everyone.. > > I'm still a Newbie so be gently > > > I have a following in a file > > Raw data = > 18822 188.22 > 133 1.33 > 230023.00 > 222003 `2220.03 > > > And when I run the following perl script the total is extremely

RE: Is there a simple way to include source code I've written in other files?

2003-07-17 Thread Charles K. Clarkson
Jamie Risk wrote: : : Until now, I've avoided writing modules by inlining the : deisred code in the new files. Messy. I'm avoiding : modules for two reasons, laziness and naive conception : that for what I'm trying to do it's overkill. Neat! Your first reason is why I use modules. Charles

Padding a record with zero's in a file

2003-07-17 Thread James Parsons
Hi everyone.. I'm still a Newbie so be gently I have a following in a file Raw data = 18822 188.22 1331.33 2300 23.00 222003 `2220.03 And when I run the following perl script the total is extremely out of wacky, total should be 2432.58

Substiuting portions of a string with elements from a hash ...

2003-07-17 Thread Jamie Risk
I'm trying to add HTML anchors to a lines of text. Quick example would be to take the line: "Search the internet using an engine like Google." and turn it into: "Search the internet using an engine like Google." In the past, I've contructed hash tables from text files having delimited key-v

Re: Comparing two strings for first difference

2003-07-17 Thread Rob Anderson
"Paul Archer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks a lot! This is just what I was looking for in your first example. > (The second example won't do me as much good, as I need to consider > characters that haven't changed inside of a string of characters that > have-

Re: Comparing two strings for first difference

2003-07-17 Thread Paul Archer
Thanks a lot! This is just what I was looking for in your first example. (The second example won't do me as much good, as I need to consider characters that haven't changed inside of a string of characters that have--but it's still a good reference.) Thanks again, paul 10:11am, Rob Anderson wro

Re: Porting perl scripts on windows

2003-07-17 Thread Michele Ouellet
"Sharad Gupta" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Any good books on how to learn perl on windows??. Learning Perl on Win32 Systems ( O'Reilly ) is pretty good. Good Luck, Michèle. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: file changed??

2003-07-17 Thread Jose M.Herrera
> From: "Jose M.Herrera" <[EMAIL PROTECTED]> > > I need to make a perl program which print "Changed!" when a file > > xx.txt is changed. please, any idea?? > > Since you are using Outlook I assume you want this under Windows, > right? Take a look at Win32::ChangeNotify module. No... with RedHat

MIME::Lite

2003-07-17 Thread Yacketta, Ronald
Hello all! I have a rather simple question that has me stumped (for about 2 hours now) I am using the MIME:Lite package (http://theoryx5.uwinnipeg.ca/CPAN/data/MIME-Lite/MIME/Lite.html) to Send reports via email from a *nix box. What I am looking to-do is send the text of a report in the body of

Re: quota's

2003-07-17 Thread Joe Stuart
Yeah, I tried that it works fine. I dont know it's probably something stupid. Even though it throws that error it will adjust the first person in the passwd files quota, but no one after that. I've even changed the script to just deal with one person at a time and I get the same error but it's succ

Re: Please help !! Socket

2003-07-17 Thread Ramprasad
Pandey Rajeev-A19514 wrote: Hi, I want to create differnent Socket Handles in a function and the function creates the created Socket Handle.. my $sock = gensym(); I am getting the same instance of Handle "S". Please some one tell me how to create different instances of sockets in perl. Regards

Re: Is there a simple way to include source code I've written inother files?

2003-07-17 Thread Ramprasad
Jamie Risk wrote: Until now, I've avoided writing modules by inlining the deisred code in the new files. Messy. I'm avoiding modules for two reasons, laziness and naive conception that for what I'm trying to do it's overkill. Thats a dangerous idea. Is there a method to reference code in other fi

RE: Is there a simple way to include source code I've written in other files?

2003-07-17 Thread wiggins
On Thu, 17 Jul 2003 10:39:56 -0400, "Jamie Risk" <[EMAIL PROTECTED]> wrote: > Until now, I've avoided writing modules by inlining the deisred code in the > new files. Messy. I'm avoiding modules for two reasons, laziness and naive > conception tha

Re: quota's

2003-07-17 Thread Ramprasad
Joe Stuart wrote: I'm trying to implement quota's using the quota interface for perl. The problem I'm having is when I execute this code. #!/usr/bin/perl use Getopt::Std; use Quota; getopt("f:s:h:"); die "Usage: $0 -f -s -h \n" if(!$opt_f || !$opt_s || !$opt_h); open(PASS, "/etc/passwd

RE: file changed??

2003-07-17 Thread wiggins
On Wed, 16 Jul 2003 21:33:56 -0400, "Jose M.Herrera" <[EMAIL PROTECTED]> wrote: > I need to make a perl program which print "Changed!" when a file xx.txt is > changed. > please, any idea?? > > Thanks for all.. > Usually two-three options with this

Is there a simple way to include source code I've written in other files?

2003-07-17 Thread Jamie Risk
Until now, I've avoided writing modules by inlining the deisred code in the new files. Messy. I'm avoiding modules for two reasons, laziness and naive conception that for what I'm trying to do it's overkill. Is there a method to reference code in other files, like, a simple "include"? -- To

Re: DBI execute problem

2003-07-17 Thread Jenda Krynicky
From: Ramprasad <[EMAIL PROTECTED]> > You are right it is weird. But just a test script to learn DBI. What I > really want is how Can I use prepare and execute which I think is > better than doing a do every time If my table name keeps changing > > Is a prepare statement always specific to a table

Re: Simple process controll question

2003-07-17 Thread Ramprasad
Gabor Urban wrote: Hi, I think the question at hand may be quite simple, though I could not figure the asnwer out :-)) MyScript.pl runs an other script (foo.pl) with the system call: system foo.pl arg1 arg2 ; I would like to have a status report (error flag) from foo.pl, which does some exit's a

RE: DBI execute problem

2003-07-17 Thread Balint, Jess
When you prepare a statement and use placeholders (?), they can only be used for parameters such as "insert into sometable values ( ?, ?, ? )" or "where somevar = ?". The parameters are bind to the statement when it is executed, which means it must successfully being prepared already. The do metho

Re: file changed??

2003-07-17 Thread Jenda Krynicky
From: "Jose M.Herrera" <[EMAIL PROTECTED]> > I need to make a perl program which print "Changed!" when a file > xx.txt is changed. please, any idea?? Since you are using Outlook I assume you want this under Windows, right? Take a look at Win32::ChangeNotify module. Jenda = [EMAIL PROTECTED]

RE: help me out please ..

2003-07-17 Thread wiggins
On 17 Jul 2003 08:23:54 -, "vemulakonda uday bhaskar" <[EMAIL PROTECTED]> wrote: > > hi all, > > i am tring to tranfer files between two linux systems through > sftop Please use a more descriptive subject line, "help me out please" is not te

Re: DBI execute problem

2003-07-17 Thread Ramprasad
Hi Ram. If all you're doing is to create a number of tables then I'd get Perl to write the whole SQL statement for you and just $dbh-do($sql) Even so, what you've written is weird. You're creating a set of thirty tables, each with two character columns with a maximum length equal to the table n

Re: Creating html source ...

2003-07-17 Thread Jamie Risk
er, sorry. Is there a module to produce html formatted output? If so, would I be directed to some documentation? > > I have to assume that any of the simple HTML-izing I want to do > > with simple text files has already been done. I'm guessing > > modules, particularly "CGI" but would appreciate

RE: Is there anyway to modify my bios clock by perl ?

2003-07-17 Thread wiggins
--- On Thu, 17 Jul 2003 09:20:20 +0800, "LI NGOK LAM" <[EMAIL PROTECTED]> wrote: > Is there anyway to modify my BIOS clock by Perl ? > and more, is there anyway to adjust my BIOS clock, so > to sync. with other time servers ? > 1) This is a very OS/har

RE: Porting perl scripts on windows

2003-07-17 Thread Janek Schleicher
Sharad Gupta wrote at Wed, 16 Jul 2003 21:03:49 -0700: > Ok, Let me try to put it the other way. > > Any good books on how to learn perl on windows??. What about "Learning Perl on Win32 Systems" by Randal L. Schwartz, Tom Christiansen, Erik Olsen from O'Reilly Greetings, Janek -- To unsubscr

Please help !! Socket

2003-07-17 Thread Pandey Rajeev-A19514
Hi, I want to create differnent Socket Handles in a function and the function creates the created Socket Handle.. my $sock = gensym(); I am getting the same instance of Handle "S". Please some one tell me how to create different instances of sockets in perl. Regards Rajeev -- To unsubscribe

RE: Pattern matching

2003-07-17 Thread Ruben Montes
thanks it's solved -Mensaje original- De: Sparrow, Dave [mailto:[EMAIL PROTECTED] Enviado el: jueves, 17 de julio de 2003 15:38 Para: Ruben Montes; '[EMAIL PROTECTED]' Asunto: RE: Pattern matching How about this: $_ = "<45>13: 16:18:46: %SYS-5-CONFIG_I"; print "$1\n" if /(%.*)$/; or, i

RE: Pattern matching

2003-07-17 Thread Sparrow, Dave
How about this: $_ = "<45>13: 16:18:46: %SYS-5-CONFIG_I"; print "$1\n" if /(%.*)$/; or, if you're reading lots of lines like this from a file: while(<>) { print "$1\n" if /(%.*)$/; } Cheers, Dave -Original Message- From: Ruben Montes [mailto:[EMAIL PROTECTED] Sent: 17 July 2003 10:2

Re: DBI execute problem

2003-07-17 Thread Rob Dixon
Ramprasad wrote: > Hello all, > > I have a mysql database and I want to create tables > w1 w2 w3 w4 ... w30 > > Can I use the prepare and execute methods of DBI > I am getting an error because DBI is quoting the table name and > Mysql is not accepting it > > This is my code > > #!/usr/bin/perl > us

Simple process controll question

2003-07-17 Thread Gabor Urban
Hi, I think the question at hand may be quite simple, though I could not figure the asnwer out :-)) MyScript.pl runs an other script (foo.pl) with the system call: system foo.pl arg1 arg2 ; I would like to have a status report (error flag) from foo.pl, which does some exit's and die's at error

RE: Sockets

2003-07-17 Thread Kipp, James
> > In the documentation of socket appears the fllowing: > $sockaddr = 'S n a4 x8' > > What means this??? it is a template for packing the generic C socket adr structure. readup on sockets for deeper explanation. the adt string is packed into structure of: a signed short, followed by an intege

Re: newbie : obtain gid of the current user

2003-07-17 Thread Sylvain Masnada
Hi again and thx John for you help. > > Hi all, > > Hello, > > > I'd like to get a script which allows me to get the gid of the > > user which is connected currently. > > I've done this "script" which is not very useful for me because > > I have to run it like this : > > id | myscript.pl > > You

RE: secure socket connection

2003-07-17 Thread Kipp, James
> > > I'm trying to set up credit card processing and one of the > first steps is to > establish a "secure socket connection" - how can i do it? (My > host does > support it) > there are som modules for this: IO::Socket::SSL Net::Daemon::SSL -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: newbie : obtain gid of the current user

2003-07-17 Thread Sylvain Masnada
Hi again and thx John for you help. > > Hi all, > > Hello, > > > I'd like to get a script which allows me to get the gid of the > > user which is connected currently. > > I've done this "script" which is not very useful for me because > > I have to run it like this : > > id | myscript.pl > > You

RE: Porting perl scripts on windows

2003-07-17 Thread Kipp, James
here is a nice tutorial to start with: http://www.sthomas.net/roberts-perl-tutorial.htm > -Original Message- > From: Gupta, Sharad [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 17, 2003 12:04 AM > To: Gupta, Sharad; [EMAIL PROTECTED] > Subject: RE: Porting perl scripts on windows > >

RE: Variable "$q" will not stay shared at

2003-07-17 Thread Bob Showalter
B. Fongo wrote: > Hello, > > I'm working on my first Perl project. Most of my cgi programs work ok, > but a look at the apache error log reveals this warning which is > clear to me: > > Variable "$xy" will not stay shared at > /data/www/cgi-perl/envir.pl line > 19. [Wed Jul 16 11:44:57 2003] [er

DBI execute problem

2003-07-17 Thread Ramprasad
Hello all, I have a mysql database and I want to create tables w1 w2 w3 w4 ... w30 Can I use the prepare and execute methods of DBI I am getting an error because DBI is quoting the table name and Mysql is not accepting it This is my code #!/usr/bin/perl use DBI; use strict; my $dbh = DBI->conne

RE: Pattern matching

2003-07-17 Thread Boon Chong Ang
while(<>){ @arr =split(" ",$_); $arr[2] =~s/\%//g; ## I am not sure whether % is a meta ## character or not. If it is not a meta character, just remove the "\" } I am also a perl beginner. Thank you & best regards, ABC -Original Message- From: Ruben Montes [mailto:[EMAIL

Re: Comparing two strings for first difference

2003-07-17 Thread Rob Anderson
Hi Paul "Rob Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Paul Archer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [snip] > > > > > If anyone can offer general improvements to that approach, that'd be > > great--but what I'm really interested in

Pattern matching

2003-07-17 Thread Ruben Montes
Hello, I have this string: <45>13: 16:18:46: %SYS-5-CONFIG_I and I only want to print all the characters behind %: %SYS-5-CONFIG_I How can I make this? Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Comparing two strings for first difference

2003-07-17 Thread Rob Anderson
"Paul Archer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] > > If anyone can offer general improvements to that approach, that'd be > great--but what I'm really interested in is finding the first element that > differs, and maybe the last as well. If there were any easy way

Re: Regular Expression (fwd)

2003-07-17 Thread Sudarshan Raghavan
trensett wrote: -- Forwarded message -- Date: Wed, 16 Jul 2003 18:23:35 -0500 (EST) From: trensett <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Regular Expression On Wed, 16 Jul 2003, Janek Schleicher wrote: Nick Diel wrote at Tue, 15 Jul 2003 11:12:18 -0600:

help me out please ..

2003-07-17 Thread vemulakonda uday bhaskar
hi all, i am tring to tranfer files between two linux systems through sftop i have installed the following modules : 1. Download Net::FTP and Install 2. Download Net::SFTP . 1. PreRequisite for Install Net::SFTP is Net::SSH::Perl 2. PreRequisite for Net::SSH::Perl is 2.1

RE: Regular Expression (fwd)

2003-07-17 Thread Nigel Peck - MIS Web Design
? means minimal matching not maximal, so without the question mark it would match up to the second closing paren in the following line. ( test data ) ( more test data ) which is not what you want, it would match up to the last closing paren in the data you gave it, forgetting about newlines,

Re: Regular Expression (fwd)

2003-07-17 Thread trensett
-- Forwarded message -- Date: Wed, 16 Jul 2003 18:23:35 -0500 (EST) From: trensett <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Regular Expression On Wed, 16 Jul 2003, Janek Schleicher wrote: > Nick Diel wrote at Tue, 15 Jul 2003 11:12:18 -0600: > > > I am having a h

Comparing two strings for first difference

2003-07-17 Thread Paul Archer
I'm working on a bit of code to update a serial LCD display. The display is 4 lines by 40 characters, and each character can be addressed individually. First, the pseudocode I have is: compare each element of the new string and the old string # each string is 160 characters, and represents what i