Re: Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-01 Thread Jeff P via beginners
Of course, I can use system calls and call the unix mount or mountpoint applications but is there a proper perl way to do this since system calls are not as elegant? Thank you. How about this module from metacpan? https://metacpan.org/pod/Sys::Linux::Mount regards. -- To unsubscribe, e-m

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

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

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: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr [SOLVED?]

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, Paul Johnson wrote: > On Wed, Sep 21, 2011 at 08:31:10AM -0400, Robert P. J. Day wrote: ... snip ... > > p.s. is there a way to identify which perl module supplies the > > Perl_Gthr_key_ptr symbol? perhaps it's just a dependency issue > > that di

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, Paul Johnson wrote: > On Wed, Sep 21, 2011 at 09:17:40AM -0400, Robert P. J. Day wrote: ... snip ... > > but there's a possible solution. when one initially configures > > the project, one can select that *all* of those host tools will be > > r

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
esigned. rday -- ==== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, 'lesleyb' wrote: > On Wed, Sep 21, 2011 at 07:24:51AM -0400, Robert P. J. Day wrote: > > > > argh ... after just skipping the component that was causing the > > earlier error, i got further and then this: > > > Probably a good ide

Re: /usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, 'lesleyb' wrote: > On Wed, Sep 21, 2011 at 07:24:51AM -0400, Robert P. J. Day wrote: > > > > argh ... after just skipping the component that was causing the > > earlier error, i got further and then this: > > > Probably a good ide

/usr/lib/perl5/auto/Cwd/Cwd.so: undefined symbol: Perl_Gthr_key_ptr

2011-09-21 Thread Robert P. J. Day
to know what's behind these things. thanks. rday -- ==== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter:

Re: symbol lookup error: .../Parser.so: undefined symbol: Perl_Istack_sp_ptr

2011-09-21 Thread Robert P. J. Day
On Wed, 21 Sep 2011, Robert P. J. Day wrote: > On Wed, 21 Sep 2011, Francisco Rivas wrote: > > > Hello, > > > > I went through the same issue and what I found was just recompile > > the module in your case it would be HTML::Parser, what i did is CPAN > > - in

Re: symbol lookup error: .../Parser.so: undefined symbol: Perl_Istack_sp_ptr

2011-09-21 Thread Robert P. J. Day
t a shot if that's what you're suggesting. rday -- ==== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter:

symbol lookup error: .../Parser.so: undefined symbol: Perl_Istack_sp_ptr

2011-09-21 Thread Robert P. J. Day
efile:617: *** [Pacemaker_Explained.txt] Error 127 obviously, publican is using perl parsing to generate the docs and i have no idea where it's supposed to find that symbol. anyone want to suggest how, on an ubuntu system, i can resolve that missing symbol? thanks. rday -- =

while and eval

2010-04-21 Thread Arun P Menon
Hello All, Could you tell me what does the following do? 1 while (<>); Also, how does 'eval' work and when is it useful? What is the difference if we put a block inside eval like: eval ( }; -- Regards, Arun.P.Menon

File Type

2010-04-13 Thread Arun P Menon
Hi All, Could you tell which is the best perl module for finding file type? I am currently using File::Type but its missing out some (Shared libraries, c programs etc...). Is there any modules to search those files. -- Regards, Arun Menon -- To unsubscribe, e-mail: beginners-unsubscr...@perl.o

RE: Email does not send attachment ...

2009-12-09 Thread Sneed, Sean P
Try the paths like this C:\\my_file.log -Original Message- From: Robert H [mailto:sigz...@gmail.com] Sent: Tuesday, December 08, 2009 6:58 PM To: beginners@perl.org Subject: Re: Email does not send attachment ... On 12/8/09 3:56 PM, Tony Esposito wrote: > Hello, > > I am using Per

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

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

Using MQSeries module with Perl on Windows

2009-06-30 Thread Sneed, Sean P[EQ]
Hello, I am hoping someone would be able to help me use the MQSeries module for Perl on Windows. I have attempted to use the following steps to get the module installed. Everything seems to fail and cannot get it installed. Perl: Installing MQSeries CPAN module on Windows XP Steps to get i

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: 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: 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: 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

Problem with addition in version 5.8.3

2007-03-27 Thread Sunil Babu P
Hi, I facing a problem with perl version 5.8.3 $prog_end_address = 0x_; $trans_address = $prog_end_address + 0x101; In version 5.8.0 $trans_address = 0x1__0100; But in Version 5.8.3 $trans_address = 0x_; I suspect this is because of 32 bit overflow. How to reslove this prob

RE: How to make a perl program to an exe file

2006-11-21 Thread Krishnakumar K P
Try Perl2Exe http://www.indigostar.com/. the only drawback i found is that the size of exe is huge. Krishnakumar K.P -Original Message- From: kilaru rajeev [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 22, 2006 11:08 AM To: Dharshana Eswaran Cc: beginners@perl.org Subject: R

RE: Hello to Perl World

2006-11-21 Thread Krishnakumar K P
http://www.textpad.com/ is also very good. -Original Message- From: Todd W [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 22, 2006 1:40 AM To: beginners@perl.org Subject: Re: Hello to Perl World "Tom Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If you

RE: about serialization

2006-11-07 Thread Krishnakumar K P
storing of an object for later use is called serialization. -Original Message- From: Practical Perl [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 07, 2006 3:29 PM To: beginners perl Subject: about serialization I saw a paper about DB_File, Three serialization wrappers are

RE: Where are These Carriage Returns Coming From?

2006-10-20 Thread Krishnakumar K P
-Original Message- From: Chris Share [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 3:24 PM To: beginners@perl.org Subject: Where are These Carriage Returns Coming From? Hi, In the output of the following code there's a carriage return between the $name variable and the "!

RE: consecutive lines in a file

2006-10-13 Thread Krishnakumar K P
-Original Message- From: Luba Pardo [mailto:[EMAIL PROTECTED] Sent: Friday, October 13, 2006 6:27 PM To: beginners@perl.org Subject: consecutive lines in a file Dear sir/madam: I am trying to write a script to process to consecutive lines at a time and compare elements of between two c

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

RE: Perl on Windows Server.

2006-08-16 Thread Krishnakumar K P
: Ryan Frantz [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 5:43 PM To: beginners@perl.org Subject: RE: Perl on Windows Server. > -Original Message- > From: Adilson P. de Souza [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 16, 2006 8:08 AM > To: beginn

Perl on Windows Server.

2006-08-16 Thread Adilson P. de Souza
Hi All This is my first post at beginner list. I work with PHP/MySQL and now i have to modify a aplication that use perl together php. My remote server is Linux, but my machine of developtment is Win XP. Is possible to develop a system on Win and to publish at Linux Server? Thera is any proble

RE: getting the exported variable into a perl variable

2006-08-10 Thread Krishnakumar K P
Perl maintains environment variables in a special hash named %ENV Krishnakumar K.P Sr.Software Engineer Cybage Software Pvt. Ltd (An SEI-CMMI Level 5 Company) West Avenue, Kalyani Nagar Pune - 411 006 Tel: 020- 66041700/ 66044700 extn: 3178 Email: [EMAIL PROTECTED] Website: www.cybage.com ---

RE: Putting file content into an array

2006-07-20 Thread Krishnakumar K P
open(FILE, $filename); @array = ; close(FILE); -Original Message- From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 11:54 AM To: Perl Beginners Subject: Putting file content into an array Hi, I need to read a specific file and put the each line of tha

RE: check existence of element in a list

2006-07-19 Thread Krishnakumar K P
%hash = map { $_ => 1 } @pclist; is correct Krishnakumar K.P Sr.Software Engineer Cybage Software Pvt. Ltd (An SEI-CMMI Level 5 Company) West Avenue, Kalyani Nagar Pune - 411 006 Tel: 020- 66041700/ 66044700 extn: 3178 Email: [EMAIL PROTECTED] Website: www.cybage.com -Original Message--

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

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

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

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

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

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

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.

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

Re: XML::LibXML on Cygwin

2005-05-23 Thread Gerrit P. Haase
marcos rebelo wrote: Just for the record: The subject is wrong, XML::XSLT is correct. XML::LibXML works ok: All tests successful, 1 test skipped. Files=22, Tests=1090, 75 wallclock secs (37.12 cusr + 25.31 csys = 62.44 CPU) /bin/make test -- OK It is possible to install this Perl module i

ftp w/o using Net::FTP

2004-10-27 Thread James P Donnelly
I am trying automate some processes and ftp is not allowed to contact servers outside my intranet (socks). I am only trying to login into a server, travese to the correct directory, dump a file and quit. I have hacked together something that gets me to the server and then it seems to hang at the

splitting with special characters

2004-06-03 Thread Singh, Ajit p
Hello All, I am trying to split a string with the / ( forward slash) as the marker. $mystring = "abcde/fghi" split (///,$mystring) -- gives me compile error split (/\//,$mystring) -- gives me abcdefghi how do i specify / as the delimitter.

Conversion of CIDR prefix into Dotted-decimal

2004-06-02 Thread Singh, Ajit p
Hello Friends, I am looking for an elegant way of converting the CIDR prefix into Dotted-decimal notation in PERL. Can someone help me out if you have already one in place. i.e CIDR prefix length Dotted-decimal Binary /1 128.0.0.0

RE: regular expr.

2004-05-20 Thread Singh, Ajit p
:[EMAIL PROTECTED] Sent: 20 May 2004 12:21 To: Singh, Ajit p Cc: [EMAIL PROTECTED] Subject: Re: regular expr. On Thu, 2004-05-20 at 12:16, Singh, Ajit p wrote: > Hello everybody, > > My problem is that I have a define a variable which combines two other > variables with preceeding zero

regular expr.

2004-05-20 Thread Singh, Ajit p
Hello everybody, My problem is that I have a define a variable which combines two other variables with preceeding zeroes. i.e final_variable : <3 digit var1><5 digit var2> if var1 is single digit i have to preceed it with two zeroes. eg : 002 if var1 is double digit i have to preceed it with on

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

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: How to determine if STDIN has piped data?

2004-03-29 Thread Keith P. Boruff
Bryan Harris wrote: Alternatively, you can use the '-t' operator: exit 0 if -t STDIN I've been waiting for this for a LONG time, thanks Smoot. - B Excellent! Worked like a charm! This is exactly the kind of thing I was looking for. Thanks! Keith P. Boruff --

How to determine if STDIN has piped data?

2004-03-28 Thread Keith P. Boruff
t's been some time ago. Thanks for any help you can offer. I'll gladly clarify if you don't understand. Keith P. Boruff -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

newbie question about chomp...

2004-02-22 Thread R i c a r d o P i c h l e r
Hi people, I can't make this work... foreach $input() { chomp $input; print "$input\n"; } But with this, I do... foreach $input() { $input =~ s/\n//; $input =~ s/\r//; print "$input\n"; } In first example, print two new line, in second work fine printing one new line. Why f

newbie question about chomp...

2004-02-22 Thread R i c a r d o P i c h l e r
Hi people, i don Ricardo Pichler -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Exiting out of eval block...

2004-02-20 Thread Singh, Ajit p
Hello Friens, I have a eval block and some if conditions within it and I would like to exit the eval block. i.e eval{ my @resp = something; if ((some condition)){ $str_output = "do something"; > I want to exit from hereto Reach After Eval

RE: help on picking up key & values

2004-02-16 Thread Singh, Ajit p
. regards, Ajitpal Singh, -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: 13 February 2004 23:56 To: Singh, Ajit p Cc: 'Rob Dixon'; [EMAIL PROTECTED] Subject: Re: help on picking up key & values

RE: RE:help on picking up key & values

2004-02-13 Thread Singh, Ajit p
: Re: RE:help on picking up key & values Ajit P Singh wrote: > > Comrades, > > > I have a function which takes up arguments as shown below: > > $str = "./place_order -t " . > "/thus/axioss/serviceID:\"" . $self->{serviceID} .

RE:help on picking up key & values

2004-02-12 Thread Singh, Ajit p
Comrades, I have a function which takes up arguments as shown below: $str = "./place_order -t " . "/thus/axioss/serviceID:\"" . $self->{serviceID} . "\" " . "/thus/axioss/supplierProduct:\"" . $self->{supplierProduct} . "\" " . "/thus/axioss/web/installationTelephoneNumbe

Regex..

2004-02-10 Thread Singh, Ajit p
Could some good samaritan help me out with this pls... I am trying to find a regular expression for the below string.. ExchangeName = MOLD%20WEST ExpectedDate = LineStatus = Z Status = NO 200 OK - and i am trying with something as below: $line =~ /([a-zA-Z_0-9.]+)\s*=\s*([a-zA-Z_0-9.]+)

Delimiter for string..

2004-02-04 Thread Singh, Ajit p
Friends, I am running a perl script as below which is working perfectly and want to replace the hardcoded values with variables. (the script accepts space as the delimiter) @respon = $placesock->print("./test.pl \"7741266\" \"DEM EXPO\" \"255.255.255.255\" \n"); and i am doing this @respon = $

comparing array value...

2004-02-03 Thread Singh, Ajit p
Hello there, could somebody let me know how do i compare the contents of an array that I have... To be specific. my array contains something like below and i need to compare whether the string "interface ATM2/0.10 multipoint" exists in my array. --

RE: Usage of Net:Telnet

2004-01-23 Thread Singh, Ajit p
Hello Friends, I am trying to get the prompt parameter right for my Telnet connection. Doesnt seem to be working... can somebody help me out with this ... The prompt from my remote host(cisco box) is as shown below: W9-BAS-01> $t = new Net::Telnet (Timeout => 10,

Query on the telnet module

2004-01-22 Thread Singh, Ajit p
I had a very urgent query on the telnet module. I tried finding the information on the net but came up blank on the same. I am a very recent freebie and I would really appreciate it if you can help me out here. This might be a very simple problem, pardon my ignorance but u will really save me a l

usage of Net::Telnet

2004-01-20 Thread Singh, Ajit p
Hi , I am trying to use the Net::Telnet module after installing in my solaris 2.8 machine. But I am unable to get the output. There is no error messages either.The program just exists. Could you help me out on this please... #!/usr/bin/perl -w use Net::Telnet (); $t = new Net::Telnet (Timeout

Re: Very slow array searching

2003-07-28 Thread George P.
$l_number) { $l_status = 'TRUE'; last; } } Or, for the memory conscious, (since foreach involves loading all elements into memory) $l_status = 'FALSE'; for (my $i=0; $i < @numbers; $i++) { if ($numbers[$i] == $l_number) { $l

Re: match count

2003-07-02 Thread George P.
> right now, I am doing this: > > while ($string =~ /pattern/g){ > $count++; > if ($count > $max_count){ > $string = substr($string,0,pos($string)); > last; > } > } How about: $string =~ s/((.*?$pattern){$max_count})(.*)/$1/s; George P. > > I k

Re: looping script

2003-07-02 Thread George P.
d line, let it finish and rerun it > manually every thing works fine (with some impact on resources which I > can live with for the moment) > How do I make it rerun? > I tried wrapping the script in a > while(1){ > use My::Module; > some script > exit; Remove the &#

Re: Parsing .csv file

2003-06-24 Thread George P.
ave a better way? > Thanks in advance, > Dave > Have a look at perldoc -q "How can I split" George P. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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: --

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

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: 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: 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: 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: 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: 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-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.

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

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: 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

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: perl behaviour on Multi processor machine

2003-02-10 Thread John P Walls
OTECTED]> on 02/10/2003 04:22:44 PM To: Madhu Reddy <[EMAIL PROTECTED]> cc: [EMAIL PROTECTED] (bcc: John P Walls/EDS/FlipChip) Subject: Re: perl behaviour on Multi processor machine Madhu Reddy wrote: > Hi, >When i ran perl script on multi processor > machine... &

Linux Perl Gantt Chart display issue

2003-01-29 Thread John P Walls
Hello, I've recently been told I am now the PERL support person, even though I've never worked with Perl before. I've gone through the O'Reilly Nutshell book, but cannot solve an issue. We are running SUSE Linux 8.0 Professional. We have a Perl script ( original author is long gone ) that doe

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

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: 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]

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: 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,

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: 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: 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: 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: 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

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: Trying PERL in windows

2002-12-04 Thread Goveia, William P
And while we're at it, there is a perl distribution at http://www.indigostar.com/indigoperl.htm I've tried it, and it's okay... Haven't tried anything fancy with it. William Goveia Application Developer Education Technology Services Indiana University, Bloomington [EMAIL PROTECTED] || http://bi

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

Re: Trailing 5 lines of a file

2002-10-29 Thread George P.
On Tue, 29 Oct 2002, zentara wrote: > On Mon, 28 Oct 2002 13:54:28 -0500, [EMAIL PROTECTED] (Nikola > Janceski) wrote: > > >without using 'tail' how can I get the trailing 5 lines of a large file > >quickly, without loading it all to memory? > > > >is there anyway without pop and shifting throu

our($var) having a lexically scoped name

2002-10-18 Thread George P.
Hi, (taken frrom Programming Perl) __BEGIN__ The our declaration declares a lexically scoped name for a global variable, which is not itself a lexical variable __END__ The part about the variable not being lexical variable can be checked by printing $main::var. However, what do you mean by a

How to check between text & binary files

2002-10-14 Thread George P.
Hi, I want to write a .pl that will take in filenames as parameters, and print out whether the files are text files or binary files. The problem I'm having is that I can't figure out a good rule to use while deciding whether a file is a text-file or a binary-file. If someone has created such a

  1   2   3   >