Re: Odd select box behaviour - SOLVED

2007-05-03 Thread aneely
[EMAIL PROTECTED] wrote: I had a wild thought and changed the select box definition. First I dropped the 'selected' attribute. That solved the problem. Then I added it back, but as such: selected=selected. That worked too. My DOCTYPE is HTML 4.01 Transitional, and I remembered reading about

Inserting Image in a button

2007-05-03 Thread Somu
Lets say, i have an image at E:/icons/ttt so, how do i show it on a button created using Tk. I tried to learn from the widget application, but they have some specific folder, INC or something.. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Query in pack and unpack functions

2007-05-03 Thread Dharshana Eswaran
Hi All, My aim is to supply a hexadecimal value and print its binary value. I have written a small piece of code for the same: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack 'A4A4', $binary; print $fields1[1]

Re: Query in pack and unpack functions

2007-05-03 Thread Dr.Ruud
Dharshana Eswaran schreef: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack 'A4A4', $binary; print $fields1[1] $fields1[0];# i need to print the Lower Nibble first and then the Higher nibble But this logic

How to eliminate the bareword error

2007-05-03 Thread sivasakthi
Hi Users, I have used following code, #!/usr/bin/perl use strict; use warnings; my $x=param(hhh); my $y=param(sss); my $z=param(ttt); It shows the following error: Bareword sss not allowed while strict subs in use at aaa.cgi line 16. Bareword ttt not allowed while strict subs in use at aaa.cgi

Re: How to eliminate the bareword error

2007-05-03 Thread yaron
You need to quote the sss and ttt use strict; use warnings; my $x=param(hhh); my $y=param(sss); my $z=param(ttt); Yaron Kahanovitch - Original Message - From: sivasakthi [EMAIL PROTECTED] To: beginners@perl.org Sent: Thursday, May 3, 2007 12:30:03 PM (GMT+0200) Auto-Detected Subject: How

Re: How to eliminate the bareword error

2007-05-03 Thread Jeff Pang
2007/5/3, sivasakthi [EMAIL PROTECTED]: Hi Users, I have used following code, #!/usr/bin/perl use strict; use warnings; my $x=param(hhh); my $y=param(sss); my $z=param(ttt); Mmmn,I think you would write them as, use strict; use warnings; use CGI qw/:standard/; my $x = param('hhh'); my $y

Re: How to eliminate the bareword error

2007-05-03 Thread sivasakthi
I need to use the Post method for x variable and Get method for y z variable. For that what i do?? Thanks, Siva On Thu, 2007-05-03 at 05:33 -0400, [EMAIL PROTECTED] wrote: You need to quote the sss and ttt use strict; use warnings; my $x=param(hhh); my $y=param(sss); my $z=param(ttt);

Re: How to eliminate the bareword error

2007-05-03 Thread Jeff Pang
2007/5/3, sivasakthi [EMAIL PROTECTED]: I need to use the Post method for x variable and Get method for y z variable. For that what i do?? As I've said,just say, use CGI qw/:standard/; This would import param routine from CGI.pm and you could use it directly for both POST and GET

Re: Query in pack and unpack functions

2007-05-03 Thread Dharshana Eswaran
Thank you Dr.Ruud. It solved my problem. :-) Thanks and Regards, Dharshana On 5/3/07, Dr.Ruud [EMAIL PROTECTED] wrote: Dharshana Eswaran schreef: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack 'A4A4', $binary;

The module constants

2007-05-03 Thread Owen
In todays listing of new CPAN modules, there was one called constants, http://search.cpan.org/~hooo/constants-0.0027/ . The synopsis reads; use constants; EXPORTS UNDEF = undef; NO = defined; YES = !NO; End of synopsis! Could someone enlighten me as why (and

Re: The module constants

2007-05-03 Thread Paul Johnson
On Thu, May 03, 2007 at 08:17:16PM +1000, Owen wrote: In todays listing of new CPAN modules, there was one called constants, http://search.cpan.org/~hooo/constants-0.0027/ . The synopsis reads; use constants; EXPORTS UNDEF = undef; NO = defined;

Re: New to OO Perl

2007-05-03 Thread Ovid
--- Nigel Peck [EMAIL PROTECTED] wrote: A cut down version of my code goes like this... ## package MIS::Common::Image_magick; use Image::Magick; sub new { my ( $class, $data ) = @_;

Re: How to eliminate the bareword error

2007-05-03 Thread sivasakthi
I have used your suggestions, but it shows the following error, Use of uninitialized value in string eq at aaa.cgi line 26, fp line 1 line 1 contains: #! /usr/bin/perl .. line 26 contains: if($y eq somestring) {

Re: How to eliminate the bareword error

2007-05-03 Thread Jeff Pang
2007/5/3, sivasakthi [EMAIL PROTECTED]: I have used your suggestions, but it shows the following error, Use of uninitialized value in string eq at aaa.cgi line 26, fp line 1 line 1 contains: #! /usr/bin/perl .. line 26 contains: if($y eq somestring) This is because $y

Re: How to eliminate the bareword error

2007-05-03 Thread Chas Owens
On 5/3/07, sivasakthi [EMAIL PROTECTED] wrote: I have used your suggestions, but it shows the following error, Use of uninitialized value in string eq at aaa.cgi line 26, fp line 1 line 1 contains: #! /usr/bin/perl .. line 26 contains: if($y eq somestring)

Re: How to eliminate the bareword error

2007-05-03 Thread Chas Owens
On 5/3/07, Chas Owens [EMAIL PROTECTED] wrote: snip Where you expecting $y to have a value? If so, then there is a snip That should be Were; I should not post before I have had caffeine. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: The module constants

2007-05-03 Thread Chas Owens
On 5/3/07, Owen [EMAIL PROTECTED] wrote: In todays listing of new CPAN modules, there was one called constants, http://search.cpan.org/~hooo/constants-0.0027/ . The synopsis reads; use constants; EXPORTS UNDEF = undef; NO = defined; YES = !NO; End of synopsis!

Re: New to OO Perl

2007-05-03 Thread Chas Owens
On 5/2/07, Nigel Peck [EMAIL PROTECTED] wrote: Hi all, I'm new to writing Object Oriented Perl and am hoping for some advice? snip You may want to read Object Oriented Perl by Conway and Design Patterns by Gamma, et al. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Inserting Image in a button

2007-05-03 Thread Chas Owens
On 5/3/07, Somu [EMAIL PROTECTED] wrote: Lets say, i have an image at E:/icons/ttt so, how do i show it on a button created using Tk. I tried to learn from the widget application, but they have some specific folder, INC or something.. You can create inline images with XPM files:

Re: New to OO Perl

2007-05-03 Thread Nigel Peck
Thanks, I read 'Intermediate Perl' but I'll have a look at these too. Thanks to Ovid and Robert for your suggestions too. Cheers, Nigel Chas Owens wrote: On 5/2/07, Nigel Peck [EMAIL PROTECTED] wrote: Hi all, I'm new to writing Object Oriented Perl and am hoping for some advice? snip

Re: Query in pack and unpack functions

2007-05-03 Thread John W. Krahn
Dharshana Eswaran wrote: Hi All, Hello, My aim is to supply a hexadecimal value and print its binary value. I have written a small piece of code for the same: $input = 23; #any decimal value $hex1 = sprintf (%x,$input); $binary = unpack 'B*', pack 'H*', $hex1; @fields1 = unpack

Re: creating hash from scalar variable

2007-05-03 Thread Goksie
Matthew J. Avitable wrote: Unf. Got the picture! I'll spend my night in the stockades :) -m Rob Dixon wrote: Matthew J. Avitable wrote: Given the original string ... my $test = 'NAS-IP-Address = 192.168.42.1 ... Acct-Unique-Session-Id = 87d380e1881d226c Timestamp =

Re: creating hash from scalar variable

2007-05-03 Thread David Van Ginneken
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; $/ = \n\n; # Specify the record separator as 2 new lines.. my $fn = 'detail-20070423_1.txt'; open my $fh, '', $fn or die $!; while($fh){ my %test; map { my ($fn,$val) = split(/=/,$_,2); $fn =~ s/^\s*//g; $fn

Re: creating hash from scalar variable

2007-05-03 Thread Dr.Ruud
David Van Ginneken schreef: $fn =~ s/^\s*//g; $fn =~ s/\s*$//g; $val =~ s/^\s*?//g if defined $val; $val =~ s/?\s*//g if defined $val; The g-modifiers and the * quantifiers and the ? are either not right or not necessary. Alternative: s/^\s+//, s/\s+$//

file lists and diffs?

2007-05-03 Thread Mathew Snyder
I have been given a task of installing a piece of backup software, then tarring up all of the associated files in order to automate the installation onto other machines. The only way I can think of doing this is to do an ls -l on / and then doing a diff after the installation and manually adding

Re: file lists and diffs?

2007-05-03 Thread Rodrick Brown
On 5/3/07, Mathew Snyder [EMAIL PROTECTED] wrote: I have been given a task of installing a piece of backup software, then tarring up all of the associated files in order to automate the installation onto other machines. The only way I can think of doing this is to do an ls -l on / and then