Re: CSV type data into hash?

2004-09-21 Thread Ricardo SIGNES
* Tim Musson <[EMAIL PROTECTED]> [2004-09-21T09:25:23] > It looks something like this; > Name,Location,Function,IPAddress > uas123,123 street,Mail,10.11.12.13 > uas321,123 street,Mail,10.11.12.14 As is often the case, I suggest going to the CPAN and searching for CSV. You'll find lots of relevent

Re: How may anonymous tables?

2004-10-05 Thread Ricardo SIGNES
* adam <[EMAIL PROTECTED]> [2004-10-04T22:32:50] > Here is the code: > my $r1 = [1,2]; > my $r2 = [1,2]; > > How many anonymous arrays do we have now? > One or two? > This shows we have two arrays: print "$r1\n$r2\n"; Two. > Is there any way to find out how the system is naming these arrays >

Re: MSSQL server 200 , cgi in perl

2004-11-18 Thread Ricardo SIGNES
* Chandrakant Reddy <[EMAIL PROTECTED]> [2004-11-18T03:20:49] > Any one tried to connect Mssql server from perl which is on Solaris Machine. > I installed Class::DBI::MSSQL using CPAN and also go through the > perldoc Class::DBI::MSSQL but didn't get much. Are you actually using Class::DBI?

Re: perl template

2005-01-05 Thread Ricardo SIGNES
* "Anish Kumar K." <[EMAIL PROTECTED]> [2005-01-05T05:52:16] > I use a perl template and getting this error > > my $templateFile="\home\anish\temp\client.html"; > $template->process($templateFile, \%inputVariables) || die "Template process > failed: ", $template->error(), "\ > n"; > > absolute p

Re: Perl Catalog

2005-02-14 Thread Ricardo SIGNES
* hengky <[EMAIL PROTECTED]> [2005-02-13T19:05:25] > --- > | id_cat | nama_category | id_parent | > - - --- > | 001 | Computer| TLCAT | > | 002 | Motherboard | 001 | Why "TLCAT" and not NULL? Th

Re: Getting the content of a .doc file under Unix

2005-02-14 Thread Ricardo SIGNES
* Octavian Rasnita <[EMAIL PROTECTED]> [2005-02-14T08:46:22] > Does anyone how to get the text from a .doc file under Unix? > I would like to make a program which is portable and also work under Linux, > not only under Windows, and I think Win32::OLE won't work under Linux. google for "catdoc" and

Re: linking perl two programms

2005-02-15 Thread Ricardo SIGNES
* "E.Horn" <[EMAIL PROTECTED]> [2005-02-15T07:11:59] > Perhaps someone can help me! > Is there the possibility to link one programm to another perl > programm?so that on click the link and the next programm starts? > Example: > print ""; > print " Hello"; > print ""; > print ""; > print "Such

Re: Case-operator

2005-02-28 Thread Ricardo SIGNES
* Vladimir D Belousov <[EMAIL PROTECTED]> [2005-02-28T07:01:02] > Is in the perl operator like C/C++ 'case' ? I believe you are asking: Is there Perl equivalent to C's switch/case construct? Not exactly. To see the official Perl documentation on this, run: perldoc -q case This will search the F

Re: Multiple file upload

2005-03-02 Thread Ricardo SIGNES
* Mallik <[EMAIL PROTECTED]> [2005-03-02T07:26:15] > Anybody knows how to upload multiple files from a web page to server > without using multiple file upload fields? The file input selects one file, and that's that. You could have the user first create an archive to upload, but then you'd need t

Re: Simple Perl code/syntax question

2004-01-23 Thread Ricardo SIGNES
* Luinrandir Hernsen <[EMAIL PROTECTED]> [2004-01-23T09:38:12] > Hallo everyone and thank you for your previous help > > in basic the code would be > Select Case > ... > end select > > how is this done in perl? Well, this is a common question. In fact, it's a frequently asked one with an entry

Re: perl editors

2004-01-30 Thread Ricardo SIGNES
* [EMAIL PROTECTED] [2004-01-30T12:55:38] > Thank you, but I was hoping to have a editor compatible with Redhat and or > HP and or AIX that gives you a color coded interface, such when there is a > syntax error it color codes it in red. If you have ever seen or used a VB > editor you know what

Re: Perl 6

2004-02-02 Thread Ricardo SIGNES
* Dan Brow <[EMAIL PROTECTED]> [2004-02-01T18:43:15] > Any one know when perl 6 will be released for production use? No, no one knows. For production use, it is still years away. -- rjbs pgp0.pgp Description: PGP signature

Re: terminal manipulation in Perl

2004-03-18 Thread Ricardo SIGNES
* Ohad Ohad <[EMAIL PROTECTED]> [2004-03-18T06:55:48] > Hey, > > How do I send the cursor to the begining of current line? > > I want to output a circular string and I want the string to start over on > the same line. This isn't so much a function of Perl as a function of your terminal. Natura

Re: Perl from Terminal in OSX

2004-03-18 Thread Ricardo SIGNES
* B McKee <[EMAIL PROTECTED]> [2004-03-18T13:48:55] > >here is what I am typing: > >>perl -e test.pl > > Change to the directory you saved the script, > make sure it's executable with > chmod +x test.pl > then run it directly > ./test.pl ...or if you don't want to make the file +x, y

Re: How to add CPAN in PPM Repository

2004-03-22 Thread Ricardo SIGNES
* Mallik <[EMAIL PROTECTED]> [2004-03-20T09:11:17] > To add CPAN into repository, I typed the below command > > ppm> rep add "CPAN" http://search.cpan.org/ The CPAN is not a PPM repository. This will never work. -- rjbs pgp0.pgp Description: PGP signature

Re: why $a became 6 ?

2004-04-15 Thread Ricardo SIGNES
* Jayakumar Rajagopal <[EMAIL PROTECTED]> [2004-04-15T14:22:08] > $a=100; $b=200; > ($a=3 && $b=6 ) if ( 1 == 1 ); > print " $a $b \n"; > > Output : 6 6 > > OR my syntax is wrong ? > regards, > Jay Your understanding of precedence is wrong. You've effectively said this: ($a = (3 && $

Re: Perl::Optomizer

2004-05-13 Thread Ricardo SIGNES
* "JupiterHost.Net" <[EMAIL PROTECTED]> [2004-05-13T11:35:58] > Bob Showalter wrote: > >> for instance: > >> $newvariable = "$howdy"; > >> should be: > >> $newvariable = $howdy; > > > >That's not an appropriate optimization. Perl objects can overload > >stringification. > > Interesting... > So

Re: combining data from more than one file...

2004-05-17 Thread Ricardo SIGNES
* "Michael S. Robeson II" <[EMAIL PROTECTED]> [2004-05-17T07:47:57] > I am having trouble with combining data from several files, and I can't > even figure out how to get started. So, I am NOT asking for any code > (though pseudo-code is ok) as I would like to try figuring this problem > out

Re: How get a special value of an arrayfield stored in an hash?

2004-05-24 Thread Ricardo SIGNES
* Bastian Angerstein <[EMAIL PROTECTED]> [2004-05-24T08:07:37] > $index = 1 > $var = ${$myhash{mykey}}[$index]; $var = $myhash{mykey}[$index] $var = $myhash{mykey}->[$index] Either will do. -- rjbs pgpc308dwTSbR.pgp Description: PGP signature

Re: The >> operator

2004-05-29 Thread Ricardo SIGNES
* gohaku <[EMAIL PROTECTED]> [2004-05-29T00:28:07] > Hi all, > I'm not sure if ">>" is an official operator in Perl but I have seen > ">>" used in conjunction with > HTML code or Long Strings. > a google search and perldoc doesn't return any useful information. > I am looking for code examples tha

Re: perl POE

2004-07-07 Thread Ricardo SIGNES
* Anish Mehta <[EMAIL PROTECTED]> [2004-07-07T04:49:30] > Does anyone knows about some good links on PERL POE, how it allows Perl > code to make asynchronous, non-blocking I/O calls and handle those I/O > calls on the basis of Event Driven model and Event Queues. poe.perl.org or, of course, the c

Re: using tr

2004-07-07 Thread Ricardo SIGNES
* Cinzia Sala <[EMAIL PROTECTED]> [2004-07-07T09:35:42] > I would like to transform a string like : > > MSDDIDWLHSRRGVCK > > in a identical string, but with two spaces between each letter: > You wouldn't use tr/// for this. There are two simple ways: $string =~ s/(.)(?!\Z)/$1 /g; # replace

Re: Counting characters in a thread

2004-07-09 Thread Ricardo SIGNES
* [EMAIL PROTECTED] [2004-07-09T07:20:57] > How would I empty $string if it contained more than ten % characters? In > other words $string = "" if split(/%/, $string) > 10; -- rjbs pgpO8nLAuJ7WJ.pgp Description: PGP signature

Re: accessing each element

2004-08-16 Thread Ricardo SIGNES
* Mandar Rahurkar <[EMAIL PROTECTED]> [2004-08-16T17:32:28] > Hi, >I have a list , > $list=['orange','red','purple']; > > How do I access each member of $list ? If this had been @list I cud have > done, > > foreach(@list) { > print $_; > } > > How does it work for a scalar ? You really, r

Re: How to Create a hash using SQL 2000

2003-12-16 Thread Ricardo SIGNES
* [EMAIL PROTECTED] [2003-12-16T07:21:19] > I am using activestate version 5.8 on XP with DBI 1.38. I am trying to > return values into an associative array so that I don't keep needing to > connect to the database. I am new to perl and DBI is looking like rocket > science. The code below has been

Re: What would be the best data structure to keep these values

2003-12-16 Thread Ricardo SIGNES
* "Hemond, Steve" <[EMAIL PROTECTED]> [2003-12-16T10:13:31] > I want trap the results of 'ps -ef' command. > > I first trap the results by splitting the results in scalar values > such as $uid $pid $ppid $stime, etc... > > I would like, for each line returned, to hold these values in an > array,

Re: alternating loop

2003-12-18 Thread Ricardo SIGNES
* Mike Blezien <[EMAIL PROTECTED]> [2003-12-18T18:48:23] > been trying to come up with a way, while going through a loop to > alternate a table cell color I always do something more like: my $i; while (<>) { print " ... \n" } The benefit here is that someday I can replace the 2 with

Re: RegEx Troubles

2003-12-19 Thread Ricardo SIGNES
* Jeremy Mann <[EMAIL PROTECTED]> [2003-12-19T13:47:26] > Given this in $_ > Most popular title searches: HREF="/title/tt0244365/">"Enterprise" (2001)" > > why would this regex not put digits in $1 ? > > $data2 =~ /popular title searches:<\/p> HREF=\"\/title\/tt(\d*)\/\">/ This code: $da

Re: using "our" across blocks

2006-05-02 Thread Ricardo SIGNES
* Anthony Ettinger <[EMAIL PROTECTED]> [2006-05-02T15:04:53] > I want to double-check that it is correct to use "our" to import globals. > > BEGIN { >our $foo = 'foo'; > } > > sub something { >our $foo; >our $bar; > } > [ ... ] > Is this the correct way to import globals? Yes, if by

Re: Grep a variable

2006-05-19 Thread Ricardo SIGNES
* Umesh T G <[EMAIL PROTECTED]> [2006-05-19T08:54:17] > I am trying to grep a variable from a scalar value. Here is the example > below. > > $var = "mydisk"; > $line = "mydisk is bad"; > if (grep/\$var/,$line) { >print "disk is not bad"; > } The simplest answer, already given, is that you sh

Re: GnuPG module help?

2006-05-24 Thread Ricardo SIGNES
* "Dr.Ruud" <[EMAIL PROTECTED]> [2006-05-24T08:13:15] > "Angus" schreef: > > my @encrypted = $gpg->encrypt ('$data', '[EMAIL PROTECTED]'); > > > That call doesn't seem right to me: > http://search.cpan.org/~frajulac/GnuPG-0.09/ > > The protoptype in GnuPG.pm: encrypt($%) On one hand, you're qui

Re: Test::Pod::Coverage

2006-06-03 Thread Ricardo SIGNES
* Ken Foskey <[EMAIL PROTECTED]> [2006-06-03T06:53:35] > #!/usr/bin/perl > # Ensure POD is set up correctly. > use Test::More; > eval "use Test::Pod 1.00"; > plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; > all_pod_files_ok( map( glob( "*.pm" ), s/.pm$//) ); Your map doesn't ma

Re: Yet another OO question

2006-06-08 Thread Ricardo SIGNES
* Graeme McLaren <[EMAIL PROTECTED]> [2006-06-08T05:44:05] > Hi all, I've just been reading a bit about accessor get/set methods. I > have a method: > > sub even{ >my $self = shift; >my $even = shift; > >$self->{_even} = $even if defined($even); >return $self->{_even}; > } >

Re: recusrive listing

2006-08-18 Thread Ricardo SIGNES
* "Smith, Derek" <[EMAIL PROTECTED]> [2006-08-17T10:52:16] > What module would be ideal for getting a recursive listing into an array > or hash? Your code, below, makes it look like you really mean "for getting a recursive directory listing." > I was looking at IO::All Is that a question? D

Re: recusrive listing

2006-08-18 Thread Ricardo SIGNES
* "Smith, Derek" <[EMAIL PROTECTED]> [2006-08-18T09:30:54] > No period conversion. Typically multiple ??? marks in the English > language has inherited dual meanings: 1) a question and 2) thinking out > loud wanting feedback. Actually, they're typically considered wrong, and to be avoided, which i

Re: log and ln formular in perl

2006-08-20 Thread Ricardo SIGNES
* chen li <[EMAIL PROTECTED]> [2006-08-20T07:18:59] > I want to get the value 2 out of log based on 10 or > natural number e (the result is 0.301 and 0.609, > respectively). What are the formular for these two > caulculation and how can I find more about math stuff > in perldoc? Perl has a natural

Re: Non-technical question

2006-09-20 Thread Ricardo SIGNES
* Mathew <[EMAIL PROTECTED]> [2006-09-20T19:29:53] > I'm curious how to pronounce various built-in variables in perl. Like > $_ or [EMAIL PROTECTED] Having never heard it spoken and only seeing it in > print, > I've taken to calling it "dunder" (Dollar + Underscore). Granted, the > way I pronou

Re: scalar in array name?

2006-10-06 Thread Ricardo SIGNES
* Kenton Brede <[EMAIL PROTECTED]> [2006-10-06T11:38:49] > I've done some searching and can't find an answer to this. I'd like > to use a scalar variable in an array name. Something like "@$scalar" > I've tried different permutations like "[EMAIL PROTECTED]", "@"$scalar"" > "@\$scalar" and none o

Re: use strict and local variables

2006-10-16 Thread Ricardo SIGNES
* Raphael Brunner <[EMAIL PROTECTED]> [2006-10-16T08:38:00] > But, my problem is, i must see this variable after the call of the sub. > I'm sorry for the first example, it was inaccurate. But this is ok (I > think) :) (because I have a lot of variables, which I must change in the > sub, I want to d

Re: Perl - Bit Manipulation

2006-11-14 Thread Ricardo SIGNES
* "Randal L. Schwartz" [2006-11-14T16:34:43] > > "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: > > Rob> This is indeed a documentation bug. perlop says, in full: > Rob> ~ The "=>" operator is a synonym for the comma, but forces any word > (consisting > Rob> ~ entirely of word characters) to

Re: Time format

2006-11-15 Thread Ricardo SIGNES
* Jm lists <[EMAIL PROTECTED]> [2006-11-15T09:57:44] > Hi members, > > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. Consult "perldoc -f localtime": #012 3 45

Re: better way to skip first few lines of file read?

2006-12-27 Thread Ricardo SIGNES
* "Dr.Ruud" <[EMAIL PROTECTED]> [2006-12-27T13:27:49] > <$TRACECSV> while $. <= 4; $. is not well-known to many Perl programmers. <$TRACECSV> for 1 .. 4; -- rjbs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Why don't I need a & to call a function?

2005-05-06 Thread Ricardo SIGNES
* Siegfried Heintze <[EMAIL PROTECTED]> [2005-05-06T01:02:59] > I've been studying this sample code that someone gave to me in response to > one of my earlier queries. Why is it not necessary to put a "&" in front of > DBH in the statement DBH->prepare? > sub DBH { [ ... ] } > > my $sth = DBH->p

Re: The last element

2005-05-07 Thread Ricardo SIGNES
* amr <[EMAIL PROTECTED]> [2005-05-07T19:45:56] > Thanks it was very useful. > Now, I need to do the same with sorted hash array. Can I? "sorted hash array" is not clear, to me. Do you mean you've done this: sort keys %hash ? If so, just reverse the sort and use the first element, or ass

Re: how to check the particular perl module is installed or not on unix machine...............

2005-10-01 Thread Ricardo SIGNES
* [EMAIL PROTECTED] [2005-10-01T09:27:16] > Perlers... > Could u plz help me how to check in unis machine whether a particular perl > module is installed on unix machine or not (Here on perl-beginners, I think non-LOL English is the preferred dialect.) The traditional test for "Do I have

Re: statistics of text

2005-11-02 Thread Ricardo SIGNES
* "Ing. Branislav Gerzo" <[EMAIL PROTECTED]> [2005-11-02T08:52:39] > I have quite interesting work. Example: I wish /I/ could find this sort of work interesting! Or profitable. > Now, I have to find all 2 words sentences with their sums in the list. > For example for this list it could be (witho

Re: What is "shift" ?

2005-11-13 Thread Ricardo SIGNES
* Dylan Stamat <[EMAIL PROTECTED]> [2005-11-13T22:19:17] > No, not the routine that deals with Arrays ! If you don't know what it is, why are you making assumptions, or telling us what it isn't? If you don't know, don't assume! > I see code like the following, everywhere: > my $coolvariable = sh

Re: Doubt

2005-12-11 Thread Ricardo SIGNES
* anand kumar <[EMAIL PROTECTED]> [2005-12-11T22:38:00] > I am new to perl .i have a doubt in analysing the following regex. >(my $book = $ref_string) =~ s/\s*(\d+(?::\d+(?:-\d+(?::\d+)?)?)?)\Z//; > > here i want to know the meaning of '?:' Normally, something enclosed in parent

Re: What does this line of code say?

2006-01-11 Thread Ricardo SIGNES
* Bill Gradwohl <[EMAIL PROTECTED]> [2006-01-11T09:08:15] > while ( ($k,$v) = each %father ) { > push( @{ $children{$v} }, $k ); > } > > It's the push line I'm having difficulty with. Here's what I understand: > > The outermost {} can be removed to simplify it to : > push( @$children{$

Re: What does this line of code say?

2006-01-11 Thread Ricardo SIGNES
* Bill Gradwohl <[EMAIL PROTECTED]> [2006-01-11T10:07:10] > On Wed, 2006-01-11 at 09:25 -0500, Ricardo SIGNES wrote: > > @{ $children{$v} } means: > > get the scalar stored in $children{$v} (which is an entry in > > %children) and dereference it as an array > >

Re: Generation of method names

2006-02-26 Thread Ricardo SIGNES
* Klaus Jantzen <[EMAIL PROTECTED]> [2006-02-24T16:09:10] > After the DB-connect I would like to automatically generate the name of the > appropriate set-method in order to reduce the typing :) : I believe that you meant that while the methods already exist, you just want to call the methods by ge