return values evaluating to true

2006-01-25 Thread radhika
Hi, I have a snippet of code as below. Even when I return 0 or '', why does @blocks evaluate to true? If rows returned are 0, then if(@blocks) should evaluate to false, correct? Thanks, Radhika --- use strict; use diagnostics; my @blocks = (); sub do_something {

filehandle question

2006-01-17 Thread radhika
Hi, Can someone tell me what is going on in this peice of code? Especially, line 409. --code start-- 405my $fh; 406my $txtfile = $file->fileName(); 407open $fh, $txtfile; 408my $plain_text = ''; 409$plain_text .= $_ foreach (<$fh>); close $fh; --code end-- I keep getti

Re: Storing a long value in an int [correction]

2005-11-09 Thread radhika
The problem was actually in our code - SetFlags(). SetFlags(unsigned short flags) which was causing the problem. I changed that to a long, and it works. Sorry for the rather un-informative description. I will try to ask better questions next time. Thanks, -radhika > radhika wrote: >>

Re: Storing a long value in an int [correction]

2005-11-09 Thread radhika
trying to set is 65536. > Is there a way I can make $flag a long int to store 65536 ? > > Thanks, > Radhika > > > -- > It is all a matter of perspective. You choose your view by choosing where > to stand. > Larry Wall > --- > > -- > To unsubscribe, e

Storing a long value in an int

2005-11-09 Thread radhika
ong int to store 65536 ? Thanks, Radhika -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Parsing a string [regexp]

2005-11-08 Thread radhika
Hi, My string looks like this B=99.99+ I have split this to just get the 99.99+ part. How can I get the $1 to be numeric and $2 to just contain the +. Thanks, Radhika -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e

[Fwd: Solving NPR's Sunday Morning Puzzles with Perl]

2005-07-25 Thread radhika
http://www.ka9q.net/puzzle/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: References

2005-06-13 Thread radhika
> > You could do it like this: > > while (@row = fetchrow_array()) { >push @$perl, { > TRADE_DATE => $row[0], > TRADE_TIME => $row[1], > FIRSTNAME => $row[2], > LASTNAME=> $row[3], > EXCHANGE=> $

References

2005-06-13 Thread radhika
Hi, I am trying to create this data structure as below: $perl = [ { fname => 'Fred', lname => 'Flintstone', residence => 'Bedrock' }, { fname => 'Barney', lname

DBI to XML

2005-06-09 Thread radhika
Hi, I am looking for a perl module that can directly take data retrieved from the db and write out an XML file. A circuitous route I had previously taken was to take the output and write it out to CSV files, which then used XML::CSV to convert it to XML. But recently on this list I discovered the m

re: blessing a class

2005-06-08 Thread radhika
Thank you all for your inputs. I am busy reading all the material. I am sure I will have questions. -rs -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

blessing a class

2005-06-07 Thread radhika
I am learning about perl modules and am having a little trouble understanding the "blessing" of an object. For instance: bless($self, $type); What does this do? Thanks, rs. -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscrib

PDF::ReportWriter not writing headers on first page

2005-05-02 Thread radhika
data_array => $records }; Any help will be appreciated. Thanks, Radhika -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: perl module to create pdf reports

2005-05-02 Thread radhika
Mike, Thanks. I am looking into PDF::API2, as well as ReportWriter. PDF::API2 seems to be a language unto itself. Thanks for pointing me to it. radhika -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: perl module to create pdf reports

2005-04-28 Thread radhika
value your comments. Thank you, Radhika > On Thu, 28 Apr 2005, radhika wrote: > >> I need to create some customized pdf reports and was wondering if there >> are any perl modules out there to help. > > Good question. Have you searched CPAN ? > > Go to <http://se

perl module to create pdf reports

2005-04-28 Thread radhika
I need the HTML page, with all the formatting etc. Any ideas will help. Thanks. Radhika -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

regexp help

2005-03-11 Thread radhika
Hi, I need to parse this string: 2005-03-11 13:49:41.19 to just get the hour and minute. my program has: if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) { print("Hour:Minute = $4:$5\n"); } This is breaking. If anyone can refine this, that would be great. thank

RE: Using the perl debugger with options

2005-02-23 Thread radhika
certain modules I am writing are not loading properly. Another way to do this I found was including perl -d in the perl script. eg #! /usr/bin/perl -d -w And this works. Thanks anyways. Radhika -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <

Re: printing output of ping command

2005-02-23 Thread radhika
This works: #!/usr/bin/perl use strict; use diagnostics; my $host = "www.netbsd.org"; my $count = 0; system("ping -c 5 $host"); = thx, Radhika > Hi All, > I have a script as follows > > my $host = shift; > my $cou

Using the perl debugger with options

2005-02-22 Thread radhika
--install --dbname="blah" does not work. Any hints will be helpful. regards, Radhika -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

accessing hash value with ->

2005-01-14 Thread radhika sambamurti
would also be helpful. thx, radhika -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

YPM::Yapp module question

2004-12-01 Thread radhika sambamurti
Hi, I have a need to work with a perl script that uses quite a few YPM modules. YPM::Yapp and so on. When I do perldoc YPM::Yapp, the module referes to YPM scripts. What does this mean? Thanks. Radhika -- It's all a matter of perspective. You can choose your view by choosing where to

RE: Regex:: using variables to hold replacement text

2004-10-13 Thread Radhika
Hi Bob, I tried what you suggested and I keep getting a unitialized value error. here is my code. If you could point me to how I could do what William is trying to do. Thanks Radhika $_= "goodbarrad"; #$foo =~ s/(.*)bar(.*)/$replacement/g; my $foo =~ s/(.*)bar(.*)/eval $1/ge; print &qu

Re: trying to create a daemon

2004-10-11 Thread Radhika
:) Right. I actually did'nt think of it, but now that you mention it, yes. thx. > On Mon, 11 Oct 2004, Radhika Sambamurti wrote: > >> I know there are many tools out there, but I would like to write a >> simple script that can login to a webserver, connect to port (whateve

trying to create a daemon

2004-10-11 Thread Radhika Sambamurti
e original perl script fork out processes. I've been reading up on fork and signals. does anybody have some suggestions on how i can do this? Thx, Radhika -- It's all a matter of perspective. You can choose your view by choosing where to stand. Larry Wall --- -- To unsubscribe, e-ma

RE: How do i run shell command

2004-08-31 Thread Radhika Sambamurti
Hi, was trying to reproduce the code below. I was wondering what the 1 is doing before the while. Is it the exit status of the while, that is until eof is reached and exit code = 1 ? thanks, radhika > If you're not reading from any other files, you don't need the > $count &g

Re: checking all pieces of split data for NULL

2004-08-13 Thread Radhika Sambamurti
Hi, Just for extra information, I am interested in understanding how the if (grep length == 0, @arrayname) works. Or perhaps I could be pointed to some documentation ie perldoc where i could find out more about is it the length function? works. thanks, radhika > while () { >

Re: using regexp to substitute - problem

2004-08-06 Thread Radhika Sambamurti
> > You probably want to use the word boundary assertion: > > s/\bTR\b/TC/g; > > See "perldoc perlre". > > -- > Gunnar Hjalmarsson > Email: http://www.gunnar.cc/cgi-bin/contact.pl Thanks! This worked. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

using regexp to substitute - problem

2004-08-06 Thread Radhika Sambamurti
Hi, I am trying to substitute "TR" for "TC". But I do not want words like "AUDIT TRAIL" to be substituted. So my regexp is: if( =~ / TR / ) { s/TR/TC/g } But this is not exactly working. As i want only those instances when TR is surrounded by spaces ie not part of any other word to be substitute

calculating http download speed

2004-06-24 Thread Radhika Sambamurti
download. Any pointers would help. thanks, Radhika -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

please disregard - this is a test

2004-04-18 Thread Radhika Sambamurti
Please disregard this message - I am testing [EMAIL PROTECTED] I have changed my postfix configuration and havent been recieving any perl mail for awhile Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: determing number of records returned with DBI

2004-03-30 Thread Radhika Sambamurti
On Tue, 30 Mar 2004 11:04:49 -0600 Andrew Gaffney <[EMAIL PROTECTED]> wrote: > Is there a way to find out how many records were returned with a DBI query? There's > the > obvious counting each record as you fetch it, but I need the count before I start > going > through them. > Hi, I found t

sort function?

2004-03-24 Thread Radhika Sambamurti
radhika wheel 1028 Mar 24 11:57 chapter11_1.pl -rwxrwxr-x 1 radhika wheel 387 Mar 24 12:37 chapter11_2.pl -rwxrwxr-x 1 radhika wheel 551 Mar 24 21:25 chapter11_3.pl -rwxrwxr-x 1 radhika wheel 281 Mar 15 16:28 file_basename.pl -rw-rw-r-- 1 radhika wheel 236 Mar 21 11:46

Re: Folder Clean-up

2004-03-15 Thread Radhika Sambamurti
On Mon, 15 Mar 2004 13:47:09 -0700 "Wiggins d Anconia" <[EMAIL PROTECTED]> wrote: > > Boy that must have been "music" to your ears ;-) those gude spelers in > the croud will get mi meaning Ah, of course!!! sarcasm. I get it. So all we need now is a spell checker parser program, which Im

Re: Folder Clean-up

2004-03-15 Thread Radhika Sambamurti
On Mon, 15 Mar 2004 14:11:44 -0500 "Randy W. Sims" <[EMAIL PROTECTED]> wrote: > You can use the perl utility 'find2perl' to generate the code for you: > > find2perl /share_folder -atime +30 > rmoldshares.pl This is great! I am a newbie... and i tried using the find2perl utility, and viola! it do

Re: [OT] Education Level

2003-12-07 Thread radhika sambamurti
On Sun, 7 Dec 2003 11:34:11 -0600 "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: > Hello, > > A recent job posting has left me curious. I would never > take a full time job as a programmer or as anything else for > that matter. I just don't make a good employee any more. > Been there. Done

Re: connecting to mysql for the first time

2003-11-01 Thread radhika sambamurti
>From this point on you have to read the mysql documentation on creating users etc. >Again perldoc DBI and perldoc DBD::mysql are great resources. On Fri, 31 Oct 2003 19:46:36 -0700 Bryan Harris <[EMAIL PROTECTED]> wrote: > > > When perl wants to connect to databases (any database) perl uses a

Re: connecting to mysql for the first time

2003-10-31 Thread radhika sambamurti
) DBD for MYSQL, ORACLE, etc. depending on the OS you are using, you can go to cpan.org and search for the modules and download and install the DBI and DBD modules. Then you can use the code below to test your db connection with perl. Hope that helps. Radhika > > > On Fri, 31

Re: connecting to mysql for the first time

2003-10-31 Thread radhika sambamurti
A good resource was perldoc DBD::mysql and perldoc DBI On Thu, 30 Oct 2003 23:48:30 -0700 Bryan Harris <[EMAIL PROTECTED]> wrote: > > > I've been enjoying perl for almost 2 years now, and I think I'm ready to > step into interacting with a database. (big step!) > > I have mysql, and I hav

Re: creating a hash list from arrays

2003-10-27 Thread radhika sambamurti
Hmmm, This did not work. my $count = keys %results_hash; gives me 0 And perl also complained that $results_hash had to be explicitly defined, so I had my $results_hash AND my %results_hash. This is not working. my hash is empty. Radhika On Mon, 27 Oct 2003 21:24:28 -0600 Daniel Staal <[EM

creating a hash list from arrays

2003-10-27 Thread radhika sambamurti
## while (my $res = $sth->fetchrow_hashref()) { push(@menu_id, $res->{"menu_item_number"}); push(@menu_desc, $res->{"description"}); my $results_hash = ($res->{"menu_item_number"}, $res->{"description"}); } Thanks, radhika -- To unsubscribe, e-