Re: how to decode it?

2007-05-10 Thread Owen Cook
On Thu, May 10, 2007 at 06:18:47PM +0800, Jen mlists wrote: > I saw this string in our web logfile. I don't know what it is.Maybe it > was encoded with utf8? > Please help show a way to decode it.Thanks! > The string is, > Maybe you should ask on a webserver list,

Re: Killing a process created using system

2007-04-25 Thread Owen Cook
On Wed, Apr 25, 2007 at 03:12:38PM +0530, Nath, Alok (STSD) wrote: > Hi, > Can I send a kill signal to a process which is created using > system call ? > > Basically I wanted to send a CTRL-C signal to the process > created by system call (of course in the same program).

Re: Sort + Use of uninitialized value

2007-04-24 Thread Owen Cook
On Wed, Apr 25, 2007 at 01:37:24AM -0400, yitzle wrote: > Warning message: > Use of uninitialized value in numeric comparison (<=>) at ... > > Code: > foreach (sort { $dHash{$b}{'VAL} <=> $dHash{$a}{'VAL'} } keys %dHash) { perhaps foreach (sort { $dHash{$b}{'VAL'} <=> $dHash{$a

Re: what's the difference between $1 and \1?

2007-03-06 Thread Owen Cook
On Wed, Mar 07, 2007 at 02:54:15PM +0800, Jm lists wrote: > Hello, > > $s="hello,test"; > > the 1st statement: > $s=~s/^(\w+)/$1 / > > the 2nd statement: > $s=~s/^(\w+)/\1 / > > > What's the difference between these two statements? > Thanks! What was the output of your test script

Re: How do I understand this HTTP::Request->new(GET => $url);

2007-02-11 Thread Owen Cook
On Mon, Feb 12, 2007 at 03:31:01PM +0800, Spark Shen wrote: > Hi: > > I am a fresh bird on perl. :-) Could gurus help me to understand this > statement. > > *HTTP::Request->new(GET => $url);* > > How does perl parse the struct *GET => $url* here. > > I found out GET is a method defined in HTTP:

Re: remove duplicate lines

2007-01-09 Thread Owen Cook
On Wed, Jan 10, 2007 at 12:47:25PM +0700, beast wrote: > I have these following data: > > a 100 > a 102 > c 100 > a 102 > b 111 > c 100 > c 102 > c 100 > c 100 > a 102 > ... > > I would like to have a list (either array or hash) with unique line . > Any help would appreciated. > Thanks. > 1.

Re: How Perl script Can know I authorize to Apache

2007-01-04 Thread Owen Cook
On Fri, Jan 05, 2007 at 09:20:55AM +0200, Shlomit Afgin wrote: > > I have a directory that define in a http.conf of apache as password > protected (with AuthUserFile, AuthName, etc) > > When a user arrive to this directory he get few links to a perl > script. > > I want to know, if there is a wa

Re: Ragarding regular expression

2007-01-04 Thread Owen Cook
On Fri, Jan 05, 2007 at 11:16:58AM +0530, Dharshana Eswaran wrote: > Hi, > > I have an array which reads as follows: > > @array = (01, 45, 02, 57, 03); > > When i try to print this array, it prints the single digit value as > > 1, 45, 2, 57, 3 > > But i want it to print like > > 01, 45, 02,

Re: click_button gives error on a existing button

2006-12-28 Thread Owen Cook
On Thu, Dec 28, 2006 at 08:46:25AM +0100, Tatiana Lloret Iglesias wrote: > Hi! > I'm executing this perl and I get an error in this line_ > $browser2->click_button( value => "Next 25 records"); > > but i dont understand why because Next 25 records button exists!! > Can you help me with this please

Re: perl script execution issue

2006-12-19 Thread Owen Cook
On Tue, Dec 19, 2006 at 03:48:49PM +0530, pradeep reddy wrote: > Yes Ruud, I edited it in windows environment, as a text pad format, then I > saved it. > > How can i correct this issue. > > -reddy. At the prompt, type # perl -p -e 's/\r$//' < winfile.txt > unixfile.txt so if your script i

Re: perl script execution issue

2006-12-18 Thread Owen Cook
On Tue, Dec 19, 2006 at 06:18:54AM +, pradeep reddy wrote: > Hi, > > The Perl excutable is located at "/usr/bin" & The script has "#!/usr/bin/env > perl" at the top. > I changed the "#!/usr/bin/env perl" to "/usr/bin perl", this time when I run > , its giving "permission denied".But, I have

Re: What's these warnings?

2006-12-11 Thread Owen Cook
On Tue, Dec 12, 2006 at 11:15:13AM +0800, Jm lists wrote: > Hello members, > > When I run: > > $ perl -c myscript.pl > perl: warning: Setting locale failed. > perl: warning: Please check that your locale settings: >LANGUAGE = (unset), >LC_ALL = (unset), >LANG = "en_US.en"

Re: Perl Script as a Cron Job

2006-10-11 Thread Owen Cook
On Wed, Oct 11, 2006 at 03:03:12PM +0400, Mazhar wrote: > Dear All, > > My Code is to ping a range of IP reading from a text file and if they are > not reachable then just write the IP's to a file. Regarding permissions i > am running the same script using root previliges and i am able to run the

Re: Standard input errors

2006-09-26 Thread Owen Cook
On Tue, 26 Sep 2006, elite elite wrote: > > > Here are my error: > > > [EMAIL PROTECTED] ~]$ perl hello.pl > String found where operator expected at hello.pl line > 15, near "print "" > (Might be a runaway multi-line "" string starting on > line 11) > (Missing semicolon on previous

Re: perl scalar

2006-09-24 Thread Owen Cook
On Sun, 24 Sep 2006, elite elite wrote: > > How do i Assign'Wright" to the scalar how do i do > that?And how do i change a value of $street to > 'Washington' $what_ever = "Wright"; $what_ever = "I have changed it from Wright to this"; $street = 'Washington'; > > How do i print $street on it

Re: Date and Time Functions

2006-09-20 Thread Owen Cook
On Wed, 20 Sep 2006 [EMAIL PROTECTED] wrote: > Hello > > I am looking for some simple perl functions that will return the current date > and time in string format. The purpose is to create a file with part of the > name being the date and time. I use something like this

RE: Re[2]: Problem with GD::Graph

2006-09-15 Thread Owen Cook
-- On Fri, 15 Sep 2006, john wrote: > Where could I find the installed DG version since it's no visible in the GD > man page. > /usr/bin/gdlib-config --version but you might want to read /usr/bin/gdlib-config --help Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: Re[2]: Problem with GD::Graph

2006-09-15 Thread Owen Cook
On Fri, 15 Sep 2006, john wrote: > Well , tried to recompile the GD-2.35 and the tests failed. It cannot > recongised those functions. > > I have installed all the required modules. > > > > > -Original Message- > From: Owen Cook [mailto:[EMAIL PROTECT

RE: Re[2]: Problem with GD::Graph

2006-09-15 Thread Owen Cook
On Fri, 15 Sep 2006, john wrote: > Well, I did that > > Putting the use GD::Graph::area in the beginning > and now the error is > > perl: relocation error: > /usr/lib/perl5/site_perl/5.8.0/i486-linux/auto/GD/GD.so: undefined symbol: > gdFontGetLarge Well it would seem to be an build type pro

RE: Problem with GD::Graph

2006-09-15 Thread Owen Cook
On Fri, 15 Sep 2006, john wrote: > I replace the crusial line with the one below > > my $graph = GD::Graph::area->new(400, 300); > > and I received the error > > Can't locate object method "new" via package "GD::Graph::area" (perhaps you > forgot to load "GD::Graph::area"?) at test2.pl line 1

Re: Problem with GD::Graph

2006-09-15 Thread Owen Cook
-- On Fri, 15 Sep 2006, john wrote: > Hi all > > > > I have installed the GD::Graph module and I tried to run the example using > this code > > > > > > #!/usr/bin/perl -w > > > > use GD::Graph; > > > > @data = ( > > ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9t

Re: Command line vs. cron

2006-09-12 Thread Owen Cook
On Tue, 12 Sep 2006, James Marks wrote: > > On Sep 12, 2006, at 9:59 PM, Owen Cook wrote: > > >> Here's the script: > >> > >> #!/usr/bin/perl > >> > >> use warnings; > >> use strict; > >> > >> my $l

Re: Command line vs. cron

2006-09-12 Thread Owen Cook
On Tue, 12 Sep 2006, James Marks wrote: > Hi folks, > > I don't know if this is a Perl or UNIX problem and I'm hoping you can > help me figure that out. > > I wrote a script that checks to see if the httpsd and mysqld processes > are running on my server and to log the results of those tests.

Re: Image/Magick - Blurring

2006-09-05 Thread Owen Cook
On Tue, 5 Sep 2006, Mike Blezien wrote: > Owen, > - Original Message - > From: "Owen Cook" <[EMAIL PROTECTED]> > To: "Mike Blezien" <[EMAIL PROTECTED]> > Cc: "Perl List" > Sent: Tuesday, September 05, 2006 7:11 PM > Subject

Re: Image/Magick - Blurring

2006-09-05 Thread Owen Cook
On Tue, 5 Sep 2006, Mike Blezien wrote: > Hello, > > I'm using the Image::Magick module and need to slight Blur a PNG image. > > my $imagepng = '/path/to/image.png'; > > my $image = Image::Magick->new(); > $image->Read($imagepng); > > # Now create image with Blur $image->Blur(geometr

Re: called too early?

2006-08-29 Thread Owen Cook
On Tue, 29 Aug 2006, Bryan Harris wrote: > > > I'm getting this warning in a simple script I'm writing: > > ** > main::overlap() called too early to check prototype at > /Users/bh/Library/perl/popdef line 272. > ** > > Th

XML::Simple help request

2006-08-21 Thread Owen Cook
I am trying to get email addresses out of a Sylpheed address book. The output of Dumper is; $VAR1 = { 'attribute-list' => [ {} ], 'first-name' => '', 'uid' => '158149473', 'cn' => 'Julie Jumper',

Re: how to create symbol table of an assembler

2006-08-18 Thread Owen Cook
Ask a c/c++ mailing list? -- Owen On Sat, 19 Aug 2006, payal sinha wrote: > hi all > > i have to write a code to generate a single pass assembler. apart from > the basic idea of assemblers , i cant proceed any further. > moreover , i would like to know , how to create symbol table , programm

Re: Converting Perl Script to Module

2006-08-09 Thread Owen Cook
> Does anyone know of any resources to aid in this? > > I have a few scripts which I am trying to turn into modules, however > the functions which run as a script (CGI) do not run as modules > > Any help etc Have a look at these as they may help; http://www.pcug.org.au/~rcook/PerlModule_HOWTO.h

RE: Perl help

2006-07-18 Thread Owen Cook
On Tue, 18 Jul 2006, Sayed, Irfan (Irfan) wrote: > > tried. but still same error. > On Tue, 18 Jul 2006, Sayed, Irfan (Irfan) wrote: > > > > > I am executing following code > > > > foreach (@vob_list) > > { > > my @repl = `$CT lsreplica -invob $_ | grep cmvobsvr1mum`; print > > @

Re: Perl help

2006-07-17 Thread Owen Cook
On Tue, 18 Jul 2006, Sayed, Irfan (Irfan) wrote: > > I am executing following code > > foreach (@vob_list) > { > my @repl = `$CT lsreplica -invob $_ | grep cmvobsvr1mum`; > print @repl; > } > > but i am not getting proper output for grep It is probably looking for the system grep.

Re: error message

2006-07-10 Thread Owen Cook
On Mon, 10 Jul 2006, Geetha Weerasooriya wrote: > > In my perl code for MapMatching, I have following while loop. When I run > the program I get the following two error messages(for each data line in > the data file) > But the out put file is created. > > Use of uninitialized value in int at f

Re: Need help with error from certain ASCII characters in a CSV file

2006-07-06 Thread Owen Cook
On Thu, 6 Jul 2006, Roman Daszczyszak wrote: > Hello all, > > I am using a script to parse a CSV file with approximately 65,000 > records. Some of these records contain characters such as é, ì, etc. > I can read and write lines containing these characters via a file > handle, however when I try

Re: reference to a hash

2006-04-14 Thread Owen Cook
On Fri, 14 Apr 2006, Brian Volk wrote: > > > I'm working through the exercises in the Alpaca book. I don't > understand why you have to pass the check_items_for_all subroutine a > reference to a hash. Why can't you just pass it the hash itself... > check_items_for_all(%all) instead for (\%all

Re: Date difference.

2006-04-05 Thread Owen Cook
On Thu, 6 Apr 2006, hridyesh pant wrote: > Hi, > i have two date string reading from the log file like below. > $date1="Mon Mar 27 02:45:15 2006"; > $date2="Wed Apr 5 23:20:46 2006"; > > $Number_of_Days = $date1-$date2; > i want to get number of days between these two dates. > Can someone help

Re: Out of memory! - from CPAN

2006-03-14 Thread Owen Cook
On Tue, 14 Mar 2006, Jerry K wrote: > Hello, > > I asked this question, and other than one response (thanks Owen!), > things have been pretty silent on this issue. > > As I am a recent subscriber, maybe this is not the place to post this > type of a request. > > Is there a better place that

Re: Out of memory! - from CPAN

2006-03-12 Thread Owen Cook
On Sun, 12 Mar 2006, Jerry K wrote: > I have perl 5.8.7 running on a well patched Solaris 10 update 1 Sparc > system. I compiled perl on this system using the latest gcc for Solaris > 10 from sunfreeware.com. > > / 655 # perl -MCPAN -e shell > > cpan shell -- CPAN exploration and modules

Re: PDF::API2

2006-02-27 Thread Owen Cook
On Tue, 28 Feb 2006, The Ghost wrote: > Does anyone know how to use the barcoding of PDF::API2? The > documentation is lacking. Place 'PDF API2 documentation barcoding' into Google and it may give you some more clues. Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: dual core cpu

2006-02-19 Thread Owen Cook
On Mon, 20 Feb 2006, Ken Perl wrote: > Does perl support dual core cpu(HT) technology? > -- > perl -e 'print unpack(u,"62V5N\"FME;G\!E ")' As an observer, I would say yes. When you configure CPAN, I think it asks a question "How many cores do you have...press enter if you don't understand this

Re: end of line

2006-02-19 Thread Owen Cook
On Sun, 19 Feb 2006, Bowen, Bruce wrote: > I have a text file with lines of varying length. > > 000,;,001,WL0,001,001,000,000,000,000 > 011,@D > ,011,000,001,050,050,105,105,004,004,064,255,000,001,116,255,255,255,106,255,255,255,255,116,255,255,255 > 012,D,038,032,000,002,000,001,000,000 > 01

Re: perl with databases

2006-02-19 Thread Owen Cook
On Sun, 19 Feb 2006, Octavian Rasnita wrote: > > I need to recommend/use a better database than MySQL that should work well > with perl. > I have read some web pages about PostgreSQL and I have seen that it has a > procedural language PLPERL, while Oracle doesn't have such a thing. I have > also

Re: pseudohash

2006-02-11 Thread Owen Cook
On Sat, 11 Feb 2006, Beast wrote: > > Could someone explain what is pseudohash means? Maybe have a read of perlref, try http://perldoc.perl.org/perlref.html Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Expect using expect.pm in perl

2006-02-08 Thread Owen Cook
On Wed, 8 Feb 2006, Leif Ericksen wrote: > I am working on a little project where I want to use expect in Perl, and > I am having some luck already but wanted to know what is the recommended > books to learn more about using expect in Perl. Will the Expect books > by O'Reilly be of value for thi

Re: How to compare hashes to find matching keys with conflicting values.

2006-02-01 Thread Owen Cook
On Wed, 1 Feb 2006, Angus wrote: > > I am trying to write a little script that will compare two hashes with the > same keys but conflicting values. I have found some great examples of how > to compare hashes and locate common keys or missing keys (in the cookbook). > I have also found a great e

Re: finding modules for perl on Linux

2006-01-14 Thread Owen Cook
On Sat, 14 Jan 2006, John Meyer wrote: > > Duh, silly me, forgot the command. > BTW, what's the difference when you run cpan as user v as root. I > assume that the modules are only installed locally then, right. Modules can be installed locally, but if you have access, they are best installed

Re: finding modules for perl on Linux

2006-01-14 Thread Owen Cook
On Sat, 14 Jan 2006, John Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, Is there anything like the CPAN program on Linux that lets you > search for and download perl modules for Linux? Yes, but that seems to be a bit of a strange question. As a user, what happens when

Re: loop Question

2006-01-10 Thread Owen Cook
On Tue, 10 Jan 2006, jcht_mck wrote: > I wanted to print if it matches my range of IP's. I thought I could use the > (#..#) and it would work, but it didn't: > > #!/usr/bin/perl -nlw > > # Print if Ip's are in > # 111.9.1-18.### or > # 111.9.20-100.### > # range > # > my $a="1-18"; > my $b="2

RE: testing perl

2006-01-08 Thread Owen Cook
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > I want to know how to use perl -d Try perldoc -q debug - Found in /usr/share/perl/5.8/pod/perlfaq3.pod How do I debug my Perl programs? lots more Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: testing perl

2006-01-08 Thread Owen Cook
On Mon, 9 Jan 2006, Saurabh_Agarwal wrote: > How can we test our Perl script? At the command prompt run #perl -c script.pl If there are no errors, it compiles ok If there are errors, fix them then run #perl script.pl and see if your logig is correct HTH Owen -- To unsubscribe, e-mai

Re: strange problem with STDIN- need help

2005-12-29 Thread Owen Cook
On Thu, 29 Dec 2005, Poonam Pahil wrote: > if($remove_CS =~ m/n/i ){ ??? } > it does not reach to this point. > > it hangs before this, at > my $remove_CS = ; > > Well this works for me cut #!/usr/bin/perl -w use strict; print "Do you w

Re: strange problem with STDIN- need help

2005-12-29 Thread Owen Cook
On Thu, 29 Dec 2005, Poonam Pahil wrote: > > Iam using to accept user input but the script just hangs at that > point. > I type in the value & program is just stuck at that point. > > i know its got to do with buffer flushing. when iam using the same piece of > code at the beginning of the scri

RE: extracting substrings from string using regexp

2005-12-13 Thread Owen Cook
On Tue, 13 Dec 2005, Pant, Hridyesh wrote: > But in windows when I am trying to install Module YAPE::Regex I am > getting below error > Can't call method "ok" on an undefined value at > > C:/Perl/site/lib/PPM/UI.pm line 881, <$__ANONIO__> line 17 Sorry, I can't help you with Windows. Also

RE: extracting substrings from string using regexp

2005-12-12 Thread Owen Cook
On Tue, 13 Dec 2005, Pant, Hridyesh wrote: > Hi, > I have successfully installed YAPE::Regex::Explain,but when I try to run > ant regex program I got below error > > Can't locate YAPE/Regex.pm in @INC (@INC contains: > C:\PROGRA~1\LUCKAS~1\ENGINS~2\ C:/Perl/lib C:/Perl/site/lib .) at > C:/Perl/

Re: extracting substrings from string using regexp

2005-12-12 Thread Owen Cook
On Mon, 12 Dec 2005, Xavier Noria wrote: > On Dec 12, 2005, at 22:10, Owen wrote: > > > Xavier Noria wrote: > >> On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: > > > >>> I have a string that looks like this : > >>> >>> name="pcmTcuFaultOutOfService"/> > > > >> > >> m// in list contex may

beginners@perl.org

2005-11-15 Thread Owen Cook
On Tue, 15 Nov 2005, Sastry wrote: > I have a script that gives error > > "Syntax error at /u/isldev3/exp/oper.pl line 7, near ") > print" > Execution of /u/isldev3/exp/oper.pl aborted due to compilation errors." > > $x =3D 3; > $y =3D 4; > $z =3D 3; > > if (($x & $y & $z) < 20) > print "

Re: Rename a file.

2005-10-26 Thread Owen Cook
On Wed, 26 Oct 2005, Pant, Hridyesh wrote: > while renaming a file I am getting below error on windows environment.. > > "Couldn't rename to : Permission denied > Couldn't rename to : Permission denied > Couldn't rename to : Permission denied > > Can any body suggest me...how to remove this

Re: displaying a message using perl code

2005-09-18 Thread Owen Cook
On Mon, 19 Sep 2005, David Swiderski wrote: > > I tried to view the perl demo at the link you provided in your email > http://www.pcug.org.au/~rcook/tute.cgi > and WAS unable to GET TO THE DEMO to view it. Fair enough, but you didn't say in what way you couldn't view that. Just a couple of text

Re: displaying a message using perl code

2005-09-17 Thread Owen Cook
On Sat, 17 Sep 2005, David Swiderski wrote: > > Hi Owen, Thanks for your reply to my email. Follows is my perl script which > I'm trying to get it to display a message. > > perl script email.pl > #!/usr/bin/perl > # Gets the data from the form > &parse_form; Wow OK, looks like you are u

Re: displaying a message using perl code

2005-09-17 Thread Owen Cook
On Sat, 17 Sep 2005, David Swiderski wrote: > > My perl question is, is there a simple way to display some text/message on > the users screen such as > > your information has been sent. > Thank You for joining the alumni community! > We hope to see you at the next reunion. Well the answer to

Re: Regex $1

2005-09-17 Thread Owen Cook
On Sat, 17 Sep 2005, Chad wrote: > I have a file with the following: > (0 rows affected) > SQL1\SQLPROD4 > > When I run the following code it finds my match, but why isn't $1 populated? > > $/ = ''; > open (VALIDFILE, "valid.txt") || die "Couldn't open file: $!"; > while ( ) > { > >

Re: help me

2005-08-30 Thread Owen Cook
On Tue, 30 Aug 2005, Raghavendra Bhat wrote: > > I am begginer to Perl.. > I need write a perl script with subroutine which accepts two strings > from standard input and checks whether first string has the second > string. > Plz help me. Try putting'perl stdin' into google and see if that

Re: Find first day of every week in a month

2005-08-29 Thread Owen Cook
On Mon, 29 Aug 2005, Anil Kumar, Malyala wrote: > > I am new to perl and working for a small project... > > I need some help from you.. > > How to get all the first days of a week in a month. There is a module Date::Calc and from that Day_of_Week $dow = Day_of_Week($year,$month,$day); Here

Re: encrypt the password stored in a file

2005-08-28 Thread Owen Cook
On Mon, 29 Aug 2005, Ken Perl wrote: > The password used to access a ftp server is stored in a text file, the > perl program gets the password from the file, the pass it to the ftp > server for logon, this is the background. > The requirement is encrypt the password store in a more secure way, >

Re: Date in perl

2005-08-27 Thread Owen Cook
On Sat, 27 Aug 2005, Gomez, Juan wrote: > > I have a problem need to work with date > > I have a input like these : 20050829 and I need to change it to > something like this : Aug 29 2005 > > but it still eludes me how to do that > > can anyone help me please? Well the steps are; 1

Re: cgi problem

2005-07-03 Thread Owen Cook
On Mon, 4 Jul 2005, Aditi Gupta wrote: > > I'm very new to CGI programming. I'm working with following: > Browser: Mozilla Firefox > Server: Apache 2.0.54 > OS: Windows XP > > I'm going through the following online tutorial for cgi: > http://www.cgi101.com/book/ > > The 1st cgi code that I w

Re: OT: nntp messages

2005-05-09 Thread Owen Cook
On Mon, 9 May 2005, Ing. Branislav Gerzo wrote: > a little OT maybe, but anyone knows how to get through nntp (I don't > want web mirror) all messages from comp.lang.perl.moderated ? > My provider doesn't support news server, so I have to use some free. I > found free nntp servers at: http://www.

Re: shift what?

2005-04-13 Thread Owen Cook
On Wed, 13 Apr 2005 [EMAIL PROTECTED] wrote: > Hi all. > I always see like : > > $a=shift; > . > shift what? @_ ? > > And how dose it work? Try this example and see if you understand what is happening. --- #!/usr/bin/perl use strict; my @array=

Re: How can we get the Line Number

2005-03-01 Thread Owen Cook
On Wed, 2 Mar 2005, Suneel Kumar B wrote: > > May be my earlier mail is missed somewhere.. I wish you all a nice day.. > > While matching a string with each line of a file, if the string is > matched with any of those lines, How can we get the line number of the > line where it is matched..? I

Re: shell scripting newsgroup

2005-02-21 Thread Owen Cook
-- On Mon, 21 Feb 2005, Christopher Spears wrote: > Is there a forum similar to this for shell scripting? > I mainly work in csh. There comp.unix.shell If you hang out in there for a while you might find something, but the ng is pretty good anyway Owen -- To unsubscribe, e-mail: [EMA

Re: Perl versus Expect(tcl) : Specific Example

2005-02-12 Thread Owen Cook
On Sat, 12 Feb 2005, perl perl wrote: > > Question2: :-) > How do you implement the Expect script above into Perll? Are there > several modules to choose from? Here is a little admin script I run from time to time which might explain the use of Perl's expect (Yes..I know, no use ofstrict or war

Re: search engine for beginners.perl.org

2005-01-25 Thread Owen Cook
On Tue, 25 Jan 2005, Vladimir Lemberg wrote: > > Is there any way so search old posts via web? For example I want to ask some > trivia question and I'm pretty sure that this question has been asked so many > times. > So before posting a new topic, I'd rather search the old ones regarding my >

Re: More elegant solution for a date conversion

2005-01-20 Thread Owen Cook
On Thu, 20 Jan 2005, Jason Balicki wrote: > > I've got a phone record that keeps the date and time > in the following format: > > YYMMDDHHMM > example: 0501201500 > > So, I've written the following to convert it to the > format: > > MM/DD/,HH:MM > example: 01/20/200

Re: use warnings

2005-01-13 Thread Owen Cook
On Fri, 14 Jan 2005, Mark Cohen wrote: > > While the use strict is quite clear to me "Perl pragma to restrict unsafe > contructs" , > the use warnings "Perl pragma to control optional warnings" is not. > What programming risks could I get without the use warnings ? perldoc -q warnings Found in

Re: Trouble Calling Modules...

2005-01-06 Thread Owen Cook
On Thu, 6 Jan 2005, Sam Pinizzotto wrote: > > I'm very new to the Perl Scene...I have an application that was developed > for Perl TK and we are now trying to convert it for use through the web. > > I can pass the info from a web form to the script, but when the script runs, > it says it can't

Re: Dates

2005-01-06 Thread Owen Cook
On Thu, 6 Jan 2005, Tim Wolak wrote: > I am in need of a quick way to get the current date in the MMDD > format. This is something I would like to understand better on how to > get the date with perl. Any suggestions would be most welcome. You need to read up on localtime.

Re: Getting the dir structure

2004-12-02 Thread Owen Cook
On Thu, 2 Dec 2004, Nilay Puri, Noida wrote: > > I have a file with thousands of line like : > > /abc/def/ijk/test.txt > > /pqr/lmn/test1.t > > > > I want to get the directory where the files test.txt and test1.txt are > lying. Try something like this ---

Re: Reg. Associative array in perl

2004-12-01 Thread Owen Cook
On Wed, 1 Dec 2004, Owen Cook wrote: I meant to say > Well that's the way hashes work. If you have a recent version of Perl, at least the order will be the same different order each time you run the program. Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: Reg. Associative array in perl

2004-12-01 Thread Owen Cook
On 1 Dec 2004, Prabahar Mosas wrote: Please check the below coding because I actually expect one output but this code print unpredictable output. I expect the following output. Apache Windows Dos Linux Unix Solaris But Machine giving output is below

Re: Sinus and PI in perl

2004-11-24 Thread Owen Cook
-- On Wed, 24 Nov 2004, Bastian Angerstein wrote: > > in an excel sheet I use: > =SIN((2*PI()/96)*1) > =SIN((2*PI()/96)*2) etc... > > my question is how to get this function in perl? > > The Results are values (in the example max. 96) on the Y-Axes of the > Sinuswave. > > BTW: > I want to

Re: Regular Expression

2004-11-22 Thread Owen Cook
On Mon, 22 Nov 2004, Anish Kumar K. wrote: > Suppose there is a line > my $line= "[ class=\"[%um_class1%]\" [%um_master=createUserCourse%]>Create User]"; > > I wanted to get the text "Create User from this line..How will I use regular > expresion to extract it... > > the condition is > > [TEX

Re: socket server

2004-11-05 Thread Owen Cook
On Fri, 5 Nov 2004, Rob Genovesi wrote: > > I'm looking to write a basic Perl server that will communicate via > TCP. I'd also like the program to be able to do other things while it > waits for client connections. Can anyone recommend that best way to do this? > > For example: A perl daem

Re: __DATA__ Token Question

2004-07-22 Thread Owen Cook
On Thu, 22 Jul 2004, Bastian Angerstein wrote: > some weeks ago I had a question regarding The DATA-Token. > > Now there is anonther one: > > Could I change the contens of the datatoken (filehandle) > during the runtime of the skript? > > If anyone has an idea I would be grateful. I am not s

Re: Net::Google

2004-05-20 Thread Owen Cook
On Thu, 20 May 2004, Mandar Rahurkar wrote: > I am trying to install the net::google module in order to use the google api however > I get following error: > > > Failed Test Stat Wstat Total Fail Failed List of Failed > ---

Re: From Windows -> Linux

2004-03-13 Thread Owen Cook
On Sat, 13 Mar 2004, Robert wrote: > I will be going totally Linux for a variety of reasons. My question is > this. I have been using ActiveState for a while and use PPM but in one > sense it was kind of limiting because I would search CPAN and see > something I liked but not be able to try it

Re: date format using localtime()

2004-03-12 Thread Owen Cook
On Fri, 12 Mar 2004, Jeff Westman wrote: > Is there a way in perl to get the month/day/year using localtime > WITHOUT using 'use POSIX qw(strftime)' or a system "date" call. > > Something using slices, maybe something like: > > print scalar ((localtime(time))[4,3,7]) > > expecting the re

Re: Formatting the decimals

2004-01-29 Thread Owen Cook
On Thu, 29 Jan 2004, Mallik wrote: > How do I format the decimals, i.e, if there is no > decimal part, then add .00, if there is one decimal, > then add '0'. > > For eg., how to convert 123 to 123.00 > and 123.5 to 123.50. sprintf Try this - #!

Re: How to calculate elapsed time ?

2004-01-28 Thread Owen Cook
On Tue, 27 Jan 2004 [EMAIL PROTECTED] wrote: > I'm trying to determine how long an system operation takes. Anyone know > of a simple way to do this ? > > I wanted to establish the start time. Then run the operation. Then mark > the finish time. Then substract the start time from the finis

Re: function that reads line numbers?

2004-01-28 Thread Owen Cook
On Tue, 27 Jan 2004, Trina Espinoza wrote: > So this may be wishful thinking, but I would be kicking myself later if I didn't > ask. Is there a function in perl where you give > the function exact line numbers and it would only read the data in the range of > lines you gave it? My other altern

Re: How to sort hashkeys by numbersize??

2004-01-20 Thread Owen Cook
On Tue, 20 Jan 2004, Bastian Angerstein wrote: > > I got the following Problem: > > My hashkeys looks like "number:string" . > > For example "10530:fileparameter-sa1" > "10529:fileparameter-mv1" > "10531:fileparameter-tx4" > > (without the " signs...) > > I would li

Re: Regarding unless in Perl

2004-01-19 Thread Owen Cook
On Mon, 19 Jan 2004, Mallik wrote: > I have the following code > > unless(-d $dir) > { >unless(mkdir $dir) >{ > print "Error\n"; >} > } > > Can I rewrite the above code in the following way > > unless (-d $dir | mkdir $dir) > { >print "Error\n"; > } > Well that works fo

Re: String manipulation

2004-01-19 Thread Owen Cook
On Mon, 19 Jan 2004, Jerry Preston wrote: > I am trying to figure out a simple, Perl way to break down any sting similar > to the following: > > $s0 = > "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, > 26,27,28,29"; > > Or in any numeric order. The string cannot b

Re: Calculations with date

2004-01-18 Thread Owen Cook
On Sun, 18 Jan 2004, danield wrote: > > I am looking for an advice or suggestion in this task: > > I do have a Perl script which contains 2 variables ($low, $high). The > value assigned to them depends on which day a

Re: Clearing Arrays

2004-01-14 Thread Owen Cook
On Wed, 14 Jan 2004, Support wrote: > confirmed I was using ' @array=()' correctly. In the end, I found the > problem that was giving me grief. This is a good forum to subscribe to. I > save all my emails into a database (1,000s so far) so I can search back if > I have a problem. If you have

Re: Making A Library of Perl Subroutines

2004-01-04 Thread Owen Cook
On Mon, 5 Jan 2004, Owen Cook wrote: > > On Sun, 4 Jan 2004, r huber wrote: > > > I am writing several subroutines that I want to make > > available to other programs without directly including > > the code in those programs. Can anyone explain how to > > do th

Re: Making A Library of Perl Subroutines

2004-01-04 Thread Owen Cook
On Sun, 4 Jan 2004, r huber wrote: > I am writing several subroutines that I want to make > available to other programs without directly including > the code in those programs. Can anyone explain how to > do this or where to go to find out how to do it. Just make a file "mylibrary.pl" or what ev

Re: create file

2004-01-02 Thread Owen Cook
On Thu, 1 Jan 2004, Norman Zhang wrote: > May I ask how could I list a file contents backward in a new file? > You might want to look at File::ReadBackwards When I first *discovered* comp.lang.perl.misc the very first posting I saw was an announcement from Uri Guttman advising a new edition

Re: compile to CGI

2003-12-25 Thread Owen Cook
On Thu, 25 Dec 2003, Stijn DM wrote: > I installed a script called "megauploader" successfully and did some layout > work in the php documents > to fit it to my own needs. > > Now I also would like to change the layout in the progress bar window. The > problem > is that this is a CGI document an

Re: lowercase

2003-10-20 Thread Owen Cook
On Mon, 20 Oct 2003, Andre Chaves Mascarenhas wrote: > Hi if i have an string lets say > $stri="Joana Prado"; > How do i transformm it into > "joana prado" > (all lowercase) $stri=lc("Joana Prado"); Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: Searchable Perl Newsgroups

2003-10-15 Thread Owen Cook
On 14 Oct 2003, PerlDiscuss - Perl Newsgroups and mailing lists wrote: > Are these newsgroups searchable from anywhere ??? > Google groups Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]