Re: Strange Output

2004-12-24 Thread Oliver Schnarchendorf
On Fri, 24 Dec 2004 12:06:00 +0530, Mallik wrote: > total 6 > drwxr-xr-x 2 mkodiche cisco 96 Dec 23 21:54 . > drwxr-xr-x 4 mkodiche cisco 1024 Dec 23 19:36 .. > -rw-r--r-- 1 mkodiche cisco 0 Dec 23 22:34 a.txt > -rwxrwxr-x 1 mkodiche cisco279 Dec 23 22:00 back

Re: traversing (and accessing values in) a hash of hashes

2004-12-11 Thread Oliver Schnarchendorf
On Sat, 11 Dec 2004 15:58:48 -0800, James marks wrote: > I want to traverse that hash of hashes to extract the user agent of > each IP whose user type is "robot" like this: > > LIST OF ROBOTS VISITING SITE: > 192.168.1.1 "...GoogleBot..." > 192.168.1.4 "...Yahoo! Slurp..." > etc... #!/usr/local/b

Re: Perl cant add up with sprintf ?

2004-11-25 Thread Oliver Schnarchendorf
On Fri, 26 Nov 2004 17:47:25 +1100, David Clarke wrote: > As well, if the large number starts with 0, I get an "Illegal octal > digit '8' at test.pl line 2, at end of line". Sorry, forgot this one. A number can't start with a zero (except if it is in front of a comma). If a number starts with a z

Re: Perl cant add up with sprintf ?

2004-11-25 Thread Oliver Schnarchendorf
On Fri, 26 Nov 2004 17:47:25 +1100, David Clarke wrote: > my $amount1 = 14313562897; > my $amount2 = 0013625; > $amount = sprintf("%011d", $amount1 + $amount2); > print $amount."\n"; > > The answer perl gives me is -01 > How can this be ? > > As well, if the large number starts with 0

Re: function that returns a HASH.

2004-06-30 Thread Oliver Schnarchendorf
On Wed, 30 Jun 2004 11:44:53 -0700 (PDT), Rod Za wrote: > and the function always returns somethings like this: > HASH(0x81b99c4)HASH(0x81b988c)HASH(0x814fcf4)HASH(0x81b9c34)HASH(0x81b9afc)HASH(0x81a54f8) > > How can i get this results in an human redable mode? Hello Rod, to see what's go

Re: Program to scan dictionary for words with letters in a particular set?

2004-05-26 Thread Oliver Schnarchendorf
On Thu, 27 May 2004 00:14:57 -0500, Jim Witte wrote: > Given a file of words W such as 'cat dog at home ...' > and a set of letters L 'aoeuidhtns' > how would I write a program to extract all words in W whose letters > are all in L? Here is an overview that should get you going: Split L with a

RE: New to Perl

2004-04-02 Thread Oliver Schnarchendorf
On Fri, 2 Apr 2004 14:17:21 -0800 , Bajaria, Praful wrote: > :) the below code works > my $content = $request->content; > print "content: $content\n"; > > but this doesn't work print "content: ".$request->content."\n"; > > Anyways, why do u have to assign to a var and print ? Okay... the us

RE: New to Perl

2004-04-02 Thread Oliver Schnarchendorf
On Fri, 2 Apr 2004 12:19:32 -0800 , Bajaria, Praful wrote: > However, when I print > print "content $request->content \n"; I get "content > HTTP::Request=HASH(0x8546b3c)->content" > and print "$response->message \n"; give me "message > HTTP::Response=HASH(0x8546b60)->message" > > Am I doing somet

Re: New to Perl

2004-04-02 Thread Oliver Schnarchendorf
On Fri, 2 Apr 2004 10:53:46 -0800 , Bajaria, Praful wrote: > my $ua = LWP::UserAgent->new; > $url = "http://www.cnn.com";; > $response = $ua->get($url); > if ($response->is_success) { > print "web site is working\n"; > } else { > print "web site is not working\n"; > } > quesion: > 1) i

Re: LWP::UserAgent Question

2004-03-31 Thread Oliver Schnarchendorf
On Thu, 1 Apr 2004 09:49:20 +0700, Hari Fajri wrote: > "$ua->credentials($netloc, $realm, $uname, $pass)" > but i do not understand what is $netloc and $realm is... $netloc is the network location. Meaning the http address plus the port the server is running on. $realm i

Re: Curved edge in Menu

2004-03-26 Thread Oliver Schnarchendorf
On Fri, 26 Mar 2004 11:04:45 +0530, jaffer wrote: > I created the attached sub menu in CGI using Tables. > > In that fig, Client Tools is the Main Menu and when I clicked on it the sub > menu appears as above. Mallik, I am sorry to tell you that you have chosen the wrong forum for your qu

Re: Question about "perl -d"

2004-03-22 Thread Oliver Schnarchendorf
On Mon, 22 Mar 2004 14:05:18 -0800 (PST), Mike Ni wrote: > At this point, I asked the debugger to dump "$cgi" > by doing "print $cgi". Instead of dumpping the > structure, it only say: > > "CGI::Base=HASH(0x8294800)" You might want to type 'h x' in the debugger to find out what 'x' can do for yo

Re: using DBI to form query with variables that have quotes

2004-03-19 Thread Oliver Schnarchendorf
On Fri, 19 Mar 2004 23:21:20 -0600, Andrew Gaffney wrote: > See the problem? I can't use either quoting consistently due to the > nature of the data I'm working with. How about using the power that is offered to you by Perl??? There is a function offered by the DBI module called 'quote'. Followi

Re: tranfering in binmode

2004-02-25 Thread Oliver Schnarchendorf
On Wed, 25 Feb 2004 19:34:10 +0200, John wrote: > Here is the output > [...] > Net::FTP=GLOB(0x1ab2694)<<< 150 Ok to send data. > Net::FTP=GLOB(0x1ab2694)<<< 226 File receive OK. > Net::FTP=GLOB(0x1ab2694)>>> QUIT > Net::FTP=GLOB(0x1ab2694)<<< 221 Goodbye. > [...] Hm, it seems that your problem cea

Re: tranfering in binmode

2004-02-25 Thread Oliver Schnarchendorf
On Wed, 25 Feb 2004 18:52:28 +0200, John wrote: > I want to transfer a document from a win32 to unix system via > Net::FTP but the operation fails (file is not sent properly) > > i have set up the VsFTPD on a linux system. > > Do you know what caused the failure? No idea whatsoever... yet I coul

Re: C# on linux

2004-01-18 Thread Oliver Schnarchendorf
On Mon, 19 Jan 2004 11:26:52 +0200, rhlinux wrote: > Do any one know how can i run C# on linux, and if i can use the > visual studio editor. This is not really the place to ask this question... still you will get an answer: You can run C# on Linus by going to

Re: Single and Double quotes in SQL

2003-09-18 Thread Oliver Schnarchendorf
On Sat, 20 Sep 2003 21:34:58 +, Pablo Fischer wrote: > I need to save some HTML text in a DataBase (MySql, using DBI). However > some HTML text will have single and double quotes, so.. how can I save > them?, for example: > It's so funny $html_text =~ s/'/''/g; $html_text =~ s/"/""/g; Use the

Re: What does $| mean?

2003-09-03 Thread Oliver Schnarchendorf
On Wed, 3 Sep 2003 19:36:50 -0700, Trina Espinoza wrote: > Saw it in a piece of code but have no clue what it does. Any > suggestions would be greatly appreciated. $| $OUTPUT_AUTOFLUSH If set to nonzero, forces an fflush(3) after every write or print on the currently sel

Re: Cron jobs and perl

2003-08-29 Thread Oliver Schnarchendorf
On Wed, 20 Aug 2003 12:59:31 +1000, Vema Venkata wrote: > The problem still persisits pls. help/suggest me what to do ? How about testing your cron tab data with the cron2english perl script mentioned in the following article? http://use.perl.org/~TorgoX/journal/14037 /oliver/ -- To u

Re: Perl Codes Written in Windows Env

2003-08-27 Thread Oliver Schnarchendorf
On Tue, 26 Aug 2003 11:25:23 +0200, [EMAIL PROTECTED] wrote: is $ENV all upper case??? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Match min and max chars

2003-08-26 Thread Oliver Schnarchendorf
On Tue, 26 Aug 2003 14:23:07 +1000, Anthony English wrote: > # make sure year is at least 2 but not more # than 4 digits > if ($year =~ /\d{2,4}/) { Hello Anthony, it is clear while your regex does match numbers bigger than 4 characters. There isn't

Re: MailSender Quotes Problem

2003-08-26 Thread Oliver Schnarchendorf
On Mon, 25 Aug 2003 23:51:47 +, Pablo Fischer wrote: > my $sender = new Mail::Sender ({ > smtp => "$this->{SERVER_IP}", > from => "pablin <[EMAIL PROTECTED]>", > to => "$nombre <$correo>", > subject => "$this->{MENSAJE_TITULO}",

Re: Benchmark times

2003-08-24 Thread Oliver Schnarchendorf
On Sun, 24 Aug 2003 01:45:42 +, Pablo Fischer wrote: > I have a system (with 3 classes), that works in this order: > [...deleted...] > How good its to do this in 10 seconds? > Exists a website with benckmark running times in Perl? How good is it??? Depends on your goals and your hardware. It s

Re: Still need unlink help!! God help me.

2003-08-14 Thread Oliver Schnarchendorf
On Fri, 8 Aug 2003 22:16:38 -0400 (EDT), perlwannabe wrote: > I tried both the suggested methods without success. But, I mightuv found a > problem. I tried all of these methods with no success and looked at the > input file "listitems.txt" and found something interesting when using a > hexeditor.

Re: Still need unlink help!! God help me.

2003-08-09 Thread Oliver Schnarchendorf
On Sat, 9 Aug 2003 00:22:09 -0400 (EDT), perlwannabe wrote: > I did indeed comment every single > variable, but deleted it from my sample script for simplicity. I have > been wrestling with this problem for a while. I did run your code and got > the following error: > > C:\testdir>perl testfile.

Re: win xp perl dist.

2003-08-08 Thread Oliver Schnarchendorf
On Wed, 06 Aug 2003 16:13:03 +1000, Dr J wrote: > Dear Perl gurus, > Can someone please point me to a Perl distribution (compiler, sample > scripts, CPAN stuff etc.) for > MS Windows? Preferably XP (home). J, you might want to use the standard perl distribution developed for Windows. Yo

Re: Create Perl Menu

2003-07-22 Thread Oliver Schnarchendorf
On Tue, 22 Jul 2003 11:35:16 -0600, Phan Ros wrote: > I need help to create a simple menu with input of a( current date), b(users > currently log in), c(name of working directory), and d(contents of the > working directory). Good, we would love to help you... yet we are not here to do your homewor

Re: methods

2003-07-19 Thread Oliver Schnarchendorf
On Sat, 19 Jul 2003 22:09:48 +0530 (IST), [EMAIL PROTECTED] wrote: > Hi all, > > Whats the difference between class methods and instance methods on perl ? > > kindly enlighten, > regards, > KM A class is a datastructure with methods that work upon this datastructures. An instance is a class aft

Re: help needed for LWP

2003-07-10 Thread Oliver Schnarchendorf
On Thu, 10 Jul 2003 15:40:56 -0700, charu wrote: > can anyone please guide me as to where i am going wrong. > hopign for some geek to help me soon Hello charu, the script that you wrote had some problems. You might want to use the following modules every time you write scripts u