Importing package symbols

2002-04-08 Thread p
Hi, I've got a file with a bunch of subroutines, wrapped up in a package. I can load up the package from my main program (using lib), and access the subs in a foo::bar() kind of way. But I'd like to access them just as bar(), i.e. import the symbols or whatever. Problem is that the usual Expor

Re: Timed Redirection between Subs

2002-04-09 Thread p
Andrew, You could use 'sleep' to delay the program for a few seconds, but I'm not sure that's what you want. You want one page to be displayed, then wait a few seconds, then show another page? Try a simple HTML re-direct instead: Stick that in above your tag. All you have to do then is mak

Re: default value -simpler method?

2002-04-10 Thread p
Hi, Just out of interest, could you do it this way: my $default = "/foo/bar/blat"; print "File to use? [$default] "; chomp(my $question = || $default); I've just started using this sort of approach to assign default values to undefined/null parameters, eg: my $age = param('age') ||

Re: Re: Checking if a hash has blank values.

2002-04-10 Thread p
Hi, What's the preferred waying of doing things... if ($var eq '') or if (defined $var) I assume they both mean pretty much the same thing? Tristan You Wrote: -- Hi Tanton, Yes, but what I really want it to do is go though all the values of the hash and if any of them contain nu

Re: passing a email address to sendmail

2002-04-10 Thread p
SL, There's a few problems with that there script, but to the point: try either: $mymail = '[EMAIL PROTECTED]'; or $mymail = "usr\@someplace.com"; The \ escapes the next character, ie treats it as a plain @ sign, not as the beginning of an array name. Using single quotes means that variables do

Re: Problem with replacing text in a variable...

2002-04-11 Thread p
Wim, You're not declaring $var1 or $var2 anywhere. Instead you're assigning 'val1' and 'val2' to elements in the hash %VarValue. So something like... $VarValue{$var1} = 'val1'; print "I like $VarValue{$var1}!"; will print out... I like val1 To define $var1, do something like: $var1 = 'cheese'

Re: Re: Problem with replacing text in a variable...

2002-04-11 Thread p
Wim, I can't believe how long it's taken me to figure out what you're on about, and what the problem (probably) is. My brain's far too slow to be at work today :) If cmd came from standard input or something, your script would work. But you're using a string to simulate that input, and because

Re: Re: Problem with replacing text in a variable...

2002-04-11 Thread p
Wim, Sorry, I forgot to mention escaping/single quoting the hash keys too... As you defined it, your hash is empty as you are trying to set 'val1', 'val2' to VarValue{undef} ($Var1 hasn't been defined). Try VarValue{'$Var1'} or VarValue{"\$Var1"} Now the string '$Val1' is a the key, not undef.

Matching last comma (not last character)

2002-04-11 Thread p
Hi, I've got a comma separate list, like: apples, oranges, pears I'd like to make it reads: apples, oranges, or pears My guess was to use s/// to turn the last ',' into ', or' Any ideas? Thanks Tristan ___ sent via the murky.net webmai

Re: Re: Matching last comma (not last character)

2002-04-11 Thread p
Thanks, it works great. I used the regex in the end, the list will only ever be a few elements long (and the script doesn't need to be efficient). Can't say I understand it completely though (I was with you up until the first comma) :) Apologies for my mail client. It's a web-based dohickey th

Re: Use of uninitialized value in concatenation (.)

2002-04-11 Thread p
Scott, You've declared it... my $drvname; ...but not initialised it(given it a value). So at the moment it has the special value 'undef' (which is treated as 0 in a numeric context, or '' in a scalar one). Try and do much with an undef and you'll get a warning, basically reminding you to do so

Re: Syntax def required

2002-04-12 Thread p
Scott, It's a method invocation arrow, used for object orientated code. Try perlboot for help (http://www.perldoc.com/perl5.6.1/pod/perlboot.html) I think O'Reilly's Advanced Perl Programming book deals with it, but you should be able to get the jist of it from the above (and the links in the

Re: FILE::BASENAME

2002-04-12 Thread p
Chris, I think perhaps a mising semi-colon and case problems could be to blame. Try use File::Basename; #observe case Because on a unix system FILE/BASENAME and File/Basename are different. Tristan You Wrote: -- I'm having problems using FILE::BASENAME and the fileparse command. I'

net::snmp and get_table

2001-06-08 Thread P lerenard
Hi, I try to get all the description from all interfaces of one router. I think oid is ifdesc??? how do you read the answer from the get_table? Thank you Pierre _ Get Your Private, Free E-mail from MSN Hotmail at http://ww

size of hash?

2001-06-26 Thread P lerenard
HI, that's not $#hash, so it is... Thanks Pierre _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

2**4 = 16 what about 16...=2

2001-06-28 Thread P lerenard
Hi , could I do 16**(0.25) can I do that without downloading any module? Thanks, Pierre _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

setuid Problem

2001-07-07 Thread P. Schaub
I need a perl script to access directorys that are not world readable. I did set the "setuid" bit for this script. When I start it says: Cant´t do suid My OS is SuSE Linux 7.0 (Kernel 2.2) any help welcome thanx Patrik

passing arguments

2001-07-10 Thread P. Schaub
Hi List, I am calling a perl script within another perl script. What is the best way to pass arguments to the second one ? Is it possible to pass arrays and hashs (or at least refs) ? So far I am calling the second script like @result=`script2.pl $arg1 $arg2 $arg3` but I guess this is quite ugly.

passing an array ref by environment variables

2001-07-14 Thread P. Schaub
Hi out there, is it possible to pass an array referenz by an environment variable to another perl script ? no1.pl my @Array=('A','B','C'); $ENV{Array}=\@Array; `./no2.pl`; no2.pl foreach my $Part (\@{ENV{Arra

fatal subroutine

2001-08-22 Thread Andre P.
Hi, I am transfering a script which is calling the fatal subroutine. On the new machine I am getting the following error: Undefined subroutine &main::fatal called at This happens when writing: &fatal("blah"); Wher is the fatal function located. Do I need to include some modules??? I can'

a1.a2.a3.a4 -> integer

2001-08-23 Thread P lerenard
Hi, I can transform an ip a1.a2.a3.a4 to an integer using b1=a1 << 24 b2=a2 << 16 b3=a3 << 8 int =b1+b2+b3+a4 now I want to do the opposite. how can I get a1.a2.a3.a4 from this integer? ok I get a1, but I start to have a headeach to get the rest Thanks Pierre __

Newbie questions...

2001-09-06 Thread Scott P
Hi all... I have an attached program w/ text file, if anyone cares to look at... It is a small perl pgm that checks filesystem(s) which have a soft/hard limit. It mails the recipient when a limit is exceeded. I have just ported to a differnet linux box. The perl version on the linux box I'm tryin

[Fwd: Newbie questions...]

2001-09-06 Thread Scott P
Hi all... I hope I didn't ask too much of my fellow perl programmers! I solved my problem, using print statements! Simple, yet profound. I apologize for any inconvenience of this thread, thanks... I surely did not expect an answer right away! -Scott Hi all... I have an attached program w

getserbyname?

2001-09-14 Thread P lerenard
Hi, I want to get the first server name or ip that my computer talk to. How I can do that? Thanks Pierre _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Fetching network info

2001-09-17 Thread P lerenard
Hi, where could I get some information about those function because perdoc.com don't give any? Thank you Pierre _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Index of foreach

2001-09-17 Thread P lerenard
you can run a counter inside the loop Pierre >From: Rasoul Hajikhani <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Index of foreach >Date: Mon, 17 Sep 2001 12:23:51 -0700 > >Hi there, >is there any way to know what is the "current" index value in a foreach >loop? > >EX: > >foreach my $var

nobody knows!?

2001-09-18 Thread P lerenard
Hi, i'm behind a firewall and I want to get the name of the server related to the program(I know it, but how my progran can know it), so people coming from another server would be blocked. Thank you don't worry is going to be my last question on this subject because it seems that nobody can

make sense?

2001-09-18 Thread P lerenard
I try to explain, i'm on unix. it is an intranet program, so everybody who are going to use this program are behind the same firewall than me + the prog run on server. I allow people do access some data asking for their ip, the ip is still the same, but somebody can change the ip on their comput

Help - Rookie question on Arrays

2001-05-17 Thread a p
Hi, Today is my first day on Perl so please bear with me if this sounds stupid... How can I find out if an array contains a particular element stored in a certain variable ? eg variable TEST1 = "030" array HOLDER = "020 040 034 056 030" I need to find out if "030" is present in the array HO

Re: Help - Rookie question on Arrays

2001-05-22 Thread a p
Hello everyone, Your assumption was right - I am a "raw newbie" and did not post the follow up questions... but they did lead me to some fairly interesting discoveries on Perl! I really did appreciate your help in solving my problem though. Thanks for your support amit >From: Paul <[EMAIL

size of textarea linked to param?

2001-05-28 Thread P lerenard
Hi, I use HTML and PERL together. I have param which is a textarea value, but even if the size accepted by the textarea should be 32K, the form don't accept it. when I push the submit button to process the data inside the textarea nothing happen if the textarea has a size > 1.6K Any suggestion?

Re: FW: rmdir

2001-09-26 Thread Scott P
>From the faq list: 1.2 - How do I unsubscribe? Now, why would you want to do that? Send mail to <[EMAIL PROTECTED]>, and wait for a response. Once you reply to the response, you'll be unsubscribed. If that doesn't work, find the email address which you are subscribed from and s

egrep and $ftp->cmd

2001-10-19 Thread P lerenard
Hi, I try to get one line from a file on another server. I tried with Net::FTP $ftp = Net::FTP->new("server"); $ftp->login($user,$pass); $ftp->cwd("dir"); @zone = $ftp->cmd("egrp -n 'zone \"try.com' file"); $ftp->quit; print @zone; I don't know if ->cmd support this command, it doesn't work with

egrep and cmd

2001-10-22 Thread P lerenard
@lines=get->(parameters,file) ? Thank you Pierre >From: Michael Fowler <[EMAIL PROTECTED]> >To: P lerenard <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: egrep and $ftp->cmd >Date: Fri, 19 Oct 2001 14:29:50 -0800 > >On Fri, Oct 19, 2001 at 08:51:45P

no luck pie charts and perl

2001-10-25 Thread P lerenard
# Convert the image to PNG and print it on standard output print $im->png; >From: Akshay Arora <[EMAIL PROTECTED]> >To: P lerenard <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: pie charts and perl >Date: 15 Oct 2001 14:00:12 -0500 > >Check out

[Fwd: Off-Topic (200%) - Where are you from?]

2001-11-09 Thread Scott P
Madison, Wi. --- Begin Message --- Rat's Mouth, Florida (commonly known as Boca Raton, but I live outside of Fort Lauderdale) Cheers, Kevin > > By reading the messages everyday I can guess most of us are from United > > States right? And since there are not a lot of messages in (my) morning

useing seek correctly?

2001-12-13 Thread L P
I need to read lines 26 and 27 to check to see if there are two things present 1. That from col 11-18 “Running ” is there and 58-82 is NULL I am using the seek function to do this. Is that correct? From my understand the only positions you can set are. 0. Beginning 1. Current 2

Can anyone help me with utime()

2002-01-10 Thread a p
I wanted to know how to use the utime() function on windows perl, any sample code and a little explanation would be very useful, thanks, aditya __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To uns

Perl XML module building

2002-02-04 Thread a p
hello everyone, i wanted to use xml extensions of perl on windows,i dunno what are the necessary modules i need to download and build,so that i could create and read xml documents atleast. Please can someone tell me what are the necessary modules i need to download in o

help for sed

2002-02-06 Thread r p
hi everyone. i am trying to use sed in order to change all my batch script. the pb is: i have the following batch: @echo on TIMETHIS.exe k:\Validation\Soft\abc.exe k:\test_1.sct k:\Validation\PlugIn\abc.link >> k:\test_1.log @echo off exit i want to delet

Help needed with '-e' operator

2009-07-08 Thread Anu P
Hi, I am trying to use the '-e' filetest operator and encountered some wired behavior. I have a tar.gz file which is around 2.6 G and this is the code...Tar.gz file is in the same directory where script is executed. unless (-e $file) { print ("ERROR: $file does not exist\n"); exit(1); } This d

Re: Help needed with '-e' operator

2009-07-09 Thread Anu P
were using an older version 5.004 on sun os, sun4x_55. I tried the same script using perl5.87 (latest version we had) and it worked!! Thanks a lot for your help. Regards, Anu. From: Robert Citek To: Perl Beginners Cc: Anu P ; John Refior Sent: Thursday, July

Re: prepend date to log

2008-11-06 Thread Jeff P.
--- On Wed, 11/5/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > Subject: prepend date to log > To: beginners@perl.org > Cc: [EMAIL PROTECTED] > Date: Wednesday, November 5, 2008, 4:11 PM > open (STDERR, ">>/path/to/debug/log/file"); > what I'm

Re: Retrieve data via DBI and write into a file

2008-11-07 Thread Jeff P.
--- On Fri, 11/7/08, Lauri Nikkinen <[EMAIL PROTECTED]> wrote: > From: Lauri Nikkinen <[EMAIL PROTECTED]> > Subject: Retrieve data via DBI and write into a file > To: beginners@perl.org > Date: Friday, November 7, 2008, 8:28 AM > > my $outfile = '>temp.txt'; # ">" is not a part of the regula

Re: Retrieve data via DBI and write into a file

2008-11-07 Thread Jeff P.
--- On Fri, 11/7/08, Lauri Nikkinen <[EMAIL PROTECTED]> wrote: > From: Lauri Nikkinen <[EMAIL PROTECTED]> > Subject: Re: Retrieve data via DBI and write into a file > To: [EMAIL PROTECTED] > Cc: beginners@perl.org > Date: Friday, November 7, 2008, 9:33 AM > Thank you for your reply. Using the c

Re: Regex path

2008-11-07 Thread Jeff P.
--- On Fri, 11/7/08, Brent Clark <[EMAIL PROTECTED]> wrote: > From: Brent Clark <[EMAIL PROTECTED]> > Subject: Regex path > To: beginners@perl.org > Date: Friday, November 7, 2008, 1:46 PM > Hiya > > I have some paths like so. > > /home/brent/cgi-bin/scripts/common/ticktaktoe > /home/brent/cgi-

RE: Is this possible? (file handles)

2004-04-01 Thread Venugopal P
Once you close the file, memory for the file handle will be deallocated. You can unlink file using the original file name. unlink ("abc"); -Original Message- From: Jeff Westman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 2:02 AM To: perl_help Subject: Is this possible? (file h

RE: Missing sequence finder for logfiles

2004-04-15 Thread Venugopal P
Will it work? open (TEST, "C:\\sample.log"); my $valcount=0; my $missvalue = 1; while () { if(/value : (\d+)/) { $val = $1; $val = $val - 1 if($val> 0); if ($valcount != $val) { $valc = $valcount + 1 ; print "\nMissing $valc

Modifiaction time of file

2006-04-28 Thread anu p
Hi, I have a requirement where I need to look at the age of file, if it's older than 2 days, I should remove it. I am trying to use the '-M ' filehandle in my script, it does not work. I get the following error Use of uninitialized value in numeric gt (>) at ./temp_age.pl line 12. #!/usr/b

Search for a Word in a file

2006-06-07 Thread anu p
Hi All, I have a requirement where I need to check if a word exists in a text file and if so, get the whole line of text which contains the word. I also need to split the line on space. Example: 1 1 0 0 P 6/6 - Code: open (FIN, "temp.txt") || die &q

Pattern Matching

2006-06-08 Thread anu p
Hi, I have the following code snippet in which I open two files for read. For each line in file 1 (log.txt), I extract the test name, which is of format "dir/file" which is my pattern and search for the line with same pattern in file 2 (rg_table.txt). Somehow it's not working. open (TST_IN, "r

Re: Pattern Matching

2006-06-08 Thread anu p
Hi, Sorry, it was working, found out the problem was due to something else. Thanks, Anu. --- anu p <[EMAIL PROTECTED]> wrote: > Hi, > > I have the following code snippet in which I open > two > files for read. > > For each line in file 1 (log.txt), I extract

Re: Recursive Copy

2006-08-18 Thread anu p
John, "John W. Krahn" <[EMAIL PROTECTED]> wrote: [ Please do not top-post ] anu p wrote: > If you have some time to help me out ... You should post your questions to the mailing list instead of individual subscribers. > I tried a similar example of recursive

Difference between <> and grep EXPR, <>

2012-01-19 Thread Andrey P
Hi! I don't understand why I need to use a list assignment for say  scalar(()=<$fh>); but not for say scalar(grep /./, <$fh>); >From perlop: If a is used in a context that is looking for a list, *a list* comprising all input lines *is returned*, one line per list element. >From perlfun

Re: split

2012-04-05 Thread mohan . p
Not sure about the code but i think below logic might work, 1) split the line into two parts , one is patterns and another is values 2) split /assign the patterns to an array and take the count 3) write a loop till the above count is reach and use the value taken in first step for each pattern in

A question about strings and hexadecimal numbers of special characters

2002-03-06 Thread O. P.
Hi. I'm very new to Perl and have a basic question. How can I convert special characters contained in a string to hexadesimal numbers. I'm trying to access a cgi program but the string I use with the post method contains quote marks, question marks, etc. and the program crashes. I have: $st

string reading 5-4

2002-04-18 Thread P lerenard
Hi How can I read a string 5 - 4 and get 1? thanks Pierre _ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: checking if domain or IP address

2002-05-01 Thread P lerenard
an ip address should have 3 dot and 2 (IPv4) so ii you check for the number of dot you have you will remove some false guess Pierre >From: drieux <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: checking if domain or IP address >Date: Tue, 30 Apr 2002 18:07

snmp->set?

2002-05-16 Thread P lerenard
Hi, I tried to change an ip route on a remote router but it is not working. the ip route stuff is in read-write so it is possible with snmp set. the program works to change syscontact and any example that I saw was to set the syscontact(not really helpfull in the real life). Any body with a samp

Interpolation Problem

2016-07-16 Thread AC P
Hello Perl gurus, I'm hoping someone here can provide a solution since I'm stuck. I'm trying to send TL1 commands resembling "RTRV-ALM-ALL;" (the simplest command you can send as an example here) via Net::SSH::Expect but they keep getting interpolated before even reaching the TL1 device. I predi

Fwd: perl one liiner

2005-08-18 Thread anu p
Note: forwarded message attached. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --- Begin Message --- Hi, I have written a perl one liner that gets rid of digits at the end of a word, but

Perl examples

2005-08-23 Thread anu p
Hi, I use perl once in a while for my office work, but I want to have more practice of it. It would be great if any one can suggest me some nice websites which have good practical perl examples. It would be nice if any one can help me with the scripts they have developed for their own use too.

Numeric sort warning

2005-08-31 Thread anu p
Note: forwarded message attached. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --- Begin Message --- Hi, I have written a simple script that does numeric or ascii sort based on the comman

Help with creating http links

2006-02-27 Thread anu p
Hi, I have a script which runs a regression and generates a log of failed tests. Eg: Test: dir1/test1.v failed My manager wants me to create a link to the file, so that if we click on the link the actual log pops up in a browser. I know the path to open the test in a browser, it's like

Re: Net::Netmask problem

2002-11-26 Thread P lerenard
what do you want to get? do you get the size of the network? if yes from there you can make your own fonction to build the netmask. From: Marija Silajev <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Net::Netmask problem Date: Mon, 25 Nov 2002 13:16:35 +0100 Hi, I have the following pr

Substitute a word in a file

2002-12-04 Thread George P.
Hi, I am looking for a way to open a file in read/write mode, seek to a particular position and then substitute a word with another word. The file is a simple text file. Does anyone know how to do this ? Thanks. George P. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Substitute a word in a file

2002-12-05 Thread George P.
E "$chrs"; Thanks again. George P. On Thu, 5 Dec 2002, Tanton Gibbs wrote: > perldoc -q "How do I change one line in a file" > - Original Message - > From: "George P." <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday

Re: Newbie question in Perl

2002-12-30 Thread George P.
On Mon, 30 Dec 2002, Anand Ramakrishna wrote: > if (-e "newfile.txt") > { > print "WARNING !! FILE newfile.txt already exists\n"; > print "Do you want to destroy all the contents and overwrite the file\n"; > print "Type Y for Yes or N or NO\n"; > $test = ; >

Re: macthing question...

2002-12-30 Thread George P.
quot;//; $text =~ s/"$//; if ($num eq '010') { --- Do this ---} else { --- Do this ---} } Bye, George P. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: toggle the case

2003-01-02 Thread George P.
le'$_ = "This Is A Mixed Case Sentence."; > s/([[:alpha:]])/$1 eq lc($1)?uc($1):lc($1)/eg; print' > tHIS iS a mIXED cASE sENTENCE. > $ perl -le'$_ = "This Is A Mixed Case Sentence."; print join"",map{$_=ord;$_+=$_>64 && $_<91 ? 32:$_>96 && $_<123 ? -32:0;chr} split //;' tHIS iS a mIXED cASE sENTENCE. George P. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Perl 5.whatever....

2003-01-06 Thread George P.
On Tue, 7 Jan 2003, Jenda Krynicky wrote: > > Since you are using MS Outlook I assume you want a Windows version, > right? > Cool!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: File Handle?

2003-01-08 Thread George P.
perldoc -f ref Example: open ($fl, "/tmp/1.o"); if (ref($fl) eq 'GLOB') { print "Is a FILEHANDLE\n"; } else { print "Isn't a FILEHANDLE\n"; } I'm not very clear if GLOB is returned only for filehandles. bye, George P. On Wed,

Regex needed.

2003-01-21 Thread George P.
YE, HI nor CIAO exists in $str. I could've done something like: if ($str !~ /$reg/) { ... } but, I don't want to change the code, just $reg. I've been trying to find something in Programming Perl, but couldn't. Does anyone know how you can do this?? Thanks. George

RE: Regex needed.

2003-01-21 Thread George P.
text" and also for classes like "text[0-9]+" This has proven to be very useful. But now, I need to check for all classes other than "text"; This has me stumped!! For eg: $str = ''; $class = 'text[0-9]+' if ($str =~ /class="$class"/) { print "TAG has this class\n"; } bye, George P. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regex needed.

2003-01-23 Thread George P.
On Wed, 22 Jan 2003, Rob Dixon wrote: > Hi George. I think you'd have had an answer by now if there was > one. I can't think of anything but I wasn't willing to post and say > 'it can't be done' without waiting for others' ideas. > > George P. w

Re: improvements to code

2003-01-24 Thread George P.
On Thu, 23 Jan 2003, Pam Derks wrote: > Hi all, > > I want to grap the: > last first middle(if any) email > from a text file > > sometimes there is a middle intital, sometimes there isn't > > sample data: > Smith, Mary [EMAIL PROTECTED] > Jones, Tommy Lee [EMAIL PROTECTED] > > can someone sugges

How to get a value from a Select (HTML Tag) and use it in Perl

2003-02-13 Thread Guy P
Hello, I've got a Perl program that create an HTML page and I would like to get in the Perl program the value that is selected in a combo list (HTML Select Tag). Thanks a lot!!! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Reg ex help

2003-02-24 Thread George P.
On Mon, 24 Feb 2003, Colin Johnstone wrote: > Gidday all, > > >From this string I wish to return everything to the left of the last > occurence of "." if it exists. > > string = "3.25.23.4"; my $string = "3.25.23.4"; my $ret = ''; $ret = $1 if ($string =~ /^(.*)\./); print "$ret"; This will p

Backslash in a string

2003-03-03 Thread Guy P
Hello, My Perl program execute a query that bring back into a variable a Windows paths initially stored in a database. I have got problems to manage the backslash. Example: Here's what is stored in the database --> \Directions\unit\progr\sourcsql I would like to get it in a variable thus I could

Managing the backslash in a string

2003-03-03 Thread Guy P
Hello, My Perl program execute a query that bring back into a variable a Windows paths initially stored in a database. I have got problems to manage the backslash. Example: Here's what is stored in the database --> \Directions\unit\progr\sourcsql I would like to get it in a variable thus I could

Re: Newby first little script. (Lots of errors and wrong ways of doing things)

2003-03-03 Thread George P.
() or die()" and "close() or die()" If open fails, the program will kill itself, so the close function will never be called. Therefore there is no need to say "close() or die()" You've done it thrice in this email, so I'm presuming that it's a habitual thing.

Re: STILL shifting through arrays of line data

2003-03-03 Thread George P.
@param; } } I used to use this logic to move through the command line parameters. This was before I discovered Getopt Hope it helps. George P. > > Why doesn't the while loop iterate all of $rest? I can't seem to figure > out how to get the loop to act on the entir

Re: Newby first little script. (Lots of errors and wrong ways of doing things)

2003-03-04 Thread George P.
On Tue, 4 Mar 2003, Paul Johnson wrote: > > George P. said: > > > On Mon, 3 Mar 2003, Scott R. Godin wrote: > > > >> > >> my @scores; > >> my @files = glob "/home/johann/smail/Spam/*"; > >> foreach my $file (@files)

Re: Backslash in a string

2003-03-05 Thread Guy P
### "Todd Wade" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > > "Beau E. Cox" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi - > > > > > -

Re: Managing the backslash in a string

2003-03-05 Thread Guy P
Look at the small program below. The result is this: DirectionsNitprogrsourcsql DirectionsNitprogrsourcsql And I would like it to be this:\Directions\unit\progr\sourcsql .Directions.unit.progr.sourcsql Notice that it doesn't print the backslashes and it

Re: Regular Expressions http error code

2003-03-12 Thread George P.
t yourself. I've never really worked with HTTP log data, but from the lines that you've given, I would say: my ($error_code); if ($ln =~ / HTTP\/\d\.\d\" (\d+)/) { ($error_code) = $1; } bye George P. > > Thanks much, > Derek > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regular Expressions http error code

2003-03-12 Thread George P.
e than once. When you say $code =~ / HTTP\/\d\.\d\" (\d+)/; $1 will contain the value captured by (\d+) Therefore, you have to check in $1 A better way to do this would be, if ($code =~ / HTTP\/\d\.\d\" (\d+)/) { print "The code is $1\n"; } else { print &qu

Re: help with a date.

2003-03-14 Thread George P.
p. > > my $date = '03242003'; > > $date = join '/', unpack 'a2a2a4', $date; Excellent. I had skimmed through pack and unpack, but there were no important uses that I could find. So, I didn't pay much attention to them. The above example has made me t

pb of listing and renaming files

2003-03-17 Thread r p
hi all i am a beginner and i need some help from you: here is my problem: -- i have to filter all files *.BMP and to rename all by *.bmp -- here is my script: --

nortel boxe connection?

2002-08-02 Thread P lerenard
is there a possiblity like on a router cisco to connect to a nortel boxe? Thanks Pierre _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

Re: Regex to split router ifDescr up

2002-08-21 Thread P lerenard
Hi, why you dont use 2 split or 2 substr ethernet t and pos are letter the rest is number if you get the position of the last letter you just have to split the string, one for the string the rest for the details. That should be quicker. Pierre >From: Shawn <[EMAIL PROTECTED]> >To: [EMAIL PROT

how to write inside crontab without crontab?

2002-08-21 Thread P lerenard
Hi, i'm triing to change my crontab file remotely. but if I don't use crontab command the system is not going to take the change. so I get @res=qx{crontab -l} but i don't change anything I open crontab with vi, is it possible to make a cmd like {crontab -l | vi -c i linexxx | vi -c :q} sounds r

Re: new output error

2002-09-11 Thread George P.
On Tue, 10 Sep 2002, Mike Singleton wrote: > The output file (myfile.csv) is blank... any ideas out there? Thanks! > > === Start=== > use strict; > my $JOBSTART = 'JOBSTART'; > my $CONDSTART = 'CONDSTART'; > my $JOBEND = 'JOBEND'; > my $CONDEND = 'CONDEND'; > my $JOBCANC = 'JOBCANC'; > my $XFER

Re: Regular expression

2002-09-12 Thread George P.
On Fri, 13 Sep 2002, Javeed SAR wrote: > > > I have a statement as follows; > I need to split them into 3 parts; > > * test_merge1 \\blrk35ed\views\test_merge1.vws > > > LIke this: > $var1 should have * > $var2 should have test_merge1 > $var3 should have \\blrk35ed\views\test_merge1.vw

Re: regexp hides info?

2002-09-24 Thread George P.
On Tue, 24 Sep 2002, David Samuelsson (PAC) wrote: > I have an array with a lot of data. > > i want to remove certain elements from it: > so i ran: >for (@array){ >s/$current_user.*//; >} > > nw when i print it, all $current user are gone as i wanted, but i

sort a hash

2002-10-09 Thread P lerenard
Hi, @array = qx{egrep -n '\{' file); foreach $el (@array) { ($num,@other} = split(/\:/,$el); $thenum{$num} = $num; } foreach $ele (sort keys %thenum) { print"$ele\n"; } except this one sort by string and not by integer, so 100 is before 99 Do you have an idea to sort that by interger and not by

RE: sort a hash

2002-10-09 Thread P lerenard
thanks working fine >From: "Wagner, David --- Senior Programmer Analyst --- WGO" ><[EMAIL PROTECTED]> >To: 'P lerenard' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >Subject: RE: sort a hash >Date: Wed, 9 Oct 2002 15:25:23 -0500 > > Replace

Thanks Re: sort a hash

2002-10-09 Thread P lerenard
thank you all really really quik answer Pierre >From: Michael Fowler <[EMAIL PROTECTED]> >To: P lerenard <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: sort a hash >Date: Wed, 9 Oct 2002 12:33:28 -0800 > >On Wed, Oct 09, 2002 at 08:21:27PM +, P le

thanks RE: sort a hash

2002-10-09 Thread P lerenard
thank you all special thanks for the first 3 on the podium Pierre >From: "Mark Anderson" <[EMAIL PROTECTED]> >To: "P lerenard" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> >Subject: RE: sort a hash >Date: Wed, 9 Oct 2002 13:28:40 -0700 >

Re: excluding @@

2002-10-10 Thread George P.
On Thu, 10 Oct 2002, Javeed SAR wrote: > Hi all, > > > I want get the last part of this sentence excluding @@ > i.e i should get my output in a variable($put) like this for the following > sentence: > > EnternalID_GetDateofBirth.vbp > > > M:\jav_test\Technical_Docs\.@@\main\int_1_2b\techdoc_1_2

  1   2   3   >