Insecure setuid?

2005-08-09 Thread Tantalo, Christopher G
Can anyone shed some light on what this error means? Insecure $ENV{PATH} while running setuid at /var/appl/sls/bin/driver.pl line 1104. Line 1104 is print `date`; If I comment this out, then the following error message appears: Insecure dependency in open while running

Re: Insecure setuid?

2005-08-09 Thread Wiggins d'Anconia
Tantalo, Christopher G wrote: Can anyone shed some light on what this error means? Insecure $ENV{PATH} while running setuid at /var/appl/sls/bin/driver.pl line 1104. Line 1104 is print `date`; You shouldn't shell out to date anyways, especially in the above manner with no

RE: Insecure setuid?

2005-08-09 Thread Tantalo, Christopher G
Ok, the date issue I can solve using the built in date functionality. The second issue, I am trying to see if the data is untainted by using my $err_file = $ENV{SLS_LOG_PATH} . /drivererror . $rt_id .. .err; if ($err_file =~ /^([EMAIL PROTECTED])$/) { $err_file =

Correct Way to read POST data

2005-08-09 Thread Shawn Devlin
Hello, I need to read the, for lack of a better term, raw post data sent to a CGI script. I have the following code: use CGI; my $Cgi = CGI-new(); my $PostData = $Cgi-query_string; Is this the correct/best way? The reason I ask is that, for one user calling my script, the $PostData

Net::SMTP : how to include sender address ?

2005-08-09 Thread gui
Hi, I'm playing around with the Net::SMTP module. I can send email correctly, but each ones I send there's no sender's address. I thought that using mail() would to that, since it's the only method that takes the sender's address as parameter. but that's not it. how can I add a sender address

revert to me asap

2005-08-09 Thread Vema Venkata
Hi Gurus, I have the following function which extracts the workstation id's sub get_work_station_id { # return W0010A40C06D0 from vbop-0x4E58:W0010A40C06D0:windows my $id = shift; return $1 if $id =~ /:([^:]+):/; return; } at present it is working fine...

Re: Transliteration operator(tr//)on EBCDIC platform

2005-08-09 Thread SADAHIRO Tomoyuki
On Mon, 8 Aug 2005 15:36:40 +0100, Nicholas Clark [EMAIL PROTECTED] wrote On Thu, Aug 04, 2005 at 11:42:54AM +0530, Sastry wrote: Hi I am trying to run this script on an EBCDIC platform using perl-5.8.6 ($a = \x89\x8a\x8b\x8c\x8d\x8f\x90\x91) =~ tr/\x89-\x91/X/; is($a, );

Re: Net::SMTP : how to include sender address ?

2005-08-09 Thread Octavian Rasnita
I guess you want to add it into the header of the message: $smtp-datasend(From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: This is the subject This is the body of the message (after an empty line. ); - Original Message - From: gui [EMAIL PROTECTED] To: beginners@perl.org Sent:

more hashref within array sorting

2005-08-09 Thread Jeremy Kister
I've got an array full of hashrefs: my @a = ( {N = '10.1.2.1'}, {N = '10.1.9.1'}, {N = '10.3.5.1'}, {N = '10.1.1.3'}, ); I want to sort this array, and print. I expect the output resemble: 10.1.1.3 10.1.2.1 10.1.9.1 10.3.5.1 I've fumbled with this for a

Re: revert to me asap

2005-08-09 Thread Xavier Noria
On Aug 9, 2005, at 6:20, Vema Venkata wrote: sub get_work_station_id { # return W0010A40C06D0 from vbop-0x4E58:W0010A40C06D0:windows my $id = shift; return $1 if $id =~ /:([^:]+):/; return; } [snip] Can you help me how to get with prefixed letter respectively

Re: more hashref within array sorting

2005-08-09 Thread Paul Johnson
On Tue, Aug 09, 2005 at 06:03:18AM -0400, Jeremy Kister wrote: I've got an array full of hashrefs: my @a = ( {N = '10.1.2.1'}, {N = '10.1.9.1'}, {N = '10.3.5.1'}, {N = '10.1.1.3'}, ); I want to sort this array, and print. I expect the output

Re: Encoding iso-8859-16

2005-08-09 Thread Sastry
Hi Nicholas Clark I agree that it is supposed to print the numerical equivalent 97. I attempted to see if there is any bug in the encode module. Surprisingly, I noticed that there are two .c files in ext/Encode/def_t.c and ext/Encode/Byte/byte_t.c which are generated using enc2xs. They are

Re: Encoding iso-8859-16

2005-08-09 Thread Nicholas Clark
On Tue, Aug 09, 2005 at 10:58:48AM +0530, Sastry wrote: Hi I get 73 printed on EBCDIC platform. I think it is supposed to print 129 as it is the numeric equivalent of 'a'. -Sastry On 8/8/05, Nicholas Clark [EMAIL PROTECTED] wrote: On your EBCDIC platform, what does this give?

Re: more hashref within array sorting

2005-08-09 Thread Jeremy Kister
On 8/9/2005 6:26 AM, Paul Johnson wrote: my @s = map { $_ - [0] } sort { $a-[0] = $b-[0] || $a-[1] = $b-[1] || $a-[2] = $b-[2] || $a-[3] = $b-[3] } map { [ $_, split /\./ ] } map { $_-{N} } @a; You clearly solved the

Re: more hashref within array sorting

2005-08-09 Thread Paul Johnson
On Tue, Aug 09, 2005 at 06:53:33AM -0400, Jeremy Kister wrote: On 8/9/2005 6:26 AM, Paul Johnson wrote: my @s = map { $_ - [0] } sort { $a-[0] = $b-[0] || $a-[1] = $b-[1] || $a-[2] = $b-[2] || $a-[3] = $b-[3] } map { [

Re: more hashref within array sorting

2005-08-09 Thread John W. Krahn
Jeremy Kister wrote: On 8/9/2005 6:26 AM, Paul Johnson wrote: my @s = map { $_ - [0] } sort { $a-[0] = $b-[0] || $a-[1] = $b-[1] || $a-[2] = $b-[2] || $a-[3] = $b-[3] } map { [ $_, split /\./ ] } map { $_-{N} } @a; You

RE: revert to me asap

2005-08-09 Thread Vema Venkata
Hi Xavier Noria, Vidal(GURU), Christopher, SOLCM(GURU) Many Thanks for you help I will go thru it and let you know spare me some time rgds Venkat -Original Message- From: Xavier Noria [mailto:[EMAIL PROTECTED] Sent: Tuesday, 9 August 2005 3:56 PM To: Perl Beginners List Cc: Vidal,

Re: Net::SMTP : how to include sender address ?

2005-08-09 Thread gui
Octavian Rasnita wrote: I guess you want to add it into the header of the message: $smtp-datasend(From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: This is the subject I made that guess a short while after I send the message. turn out : $smtp-datasend(From: email address); was the

help with pack/unpack

2005-08-09 Thread Binish A R
I've a bit string something like 1100110100111 which is the bit representation of A and B together. How can I use unpack/pack to get this characters back? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: help with pack/unpack

2005-08-09 Thread Binish A R
Binish A R wrote: I've a bit string something like 1100110100111 which is the bit representation of A and B together. How can I use unpack/pack to get this characters back? oops small mistake .. the bit representation for AB together is 01010110. Going thru perlpacktut, I

Re: help with pack/unpack

2005-08-09 Thread John W. Krahn
Binish A R wrote: Binish A R wrote: I've a bit string something like 1100110100111 which is the bit representation of A and B together. How can I use unpack/pack to get this characters back? oops small mistake .. the bit representation for AB together is 01010110. Going

Re: help with pack/unpack

2005-08-09 Thread Jeff 'japhy' Pinyan
On Aug 9, Binish A R said: perl -le '$d = pack('B8' x 2, 01010110); print $d' But its giving me only A ... When you say pack(B8B8, ...), Perl is expecting TWO additional arguments to pack(), not just ONE. $str = pack(B8 B8, 0101, 0110); returns AB. You could juse use

Seeding variables from command line

2005-08-09 Thread Derrick_Ballentine
Sorry to bother everyone, but i was working on this yesterday and i couldn't get it to work. I guess i have the wrong syntax for passing variables in from the command line. Here's my script: = crypt.pl = #!/usr/bin/perl my $pwd = $1; my $seed = $2; my $key =

Is there any Makefile.pl example?

2005-08-09 Thread Yu Wang
Hi, I have written a program using Gtk2 in Perl. It's the first time I write program in Perl, so I need some help in writting the Makefile.pl I have 1 file for main program, and 5 files for modules. Besides that, I also have document files and some data files to be accessed by the code. I have

Re: Seeding variables from command line

2005-08-09 Thread Jeff 'japhy' Pinyan
On Aug 9, [EMAIL PROTECTED] said: my $pwd = $1; my $seed = $2; That's shell syntax, Derrick. Perl's command-line arguments are stored in @ARGV. my ($pwd, $seed) = @ARGV; or my $pwd = $ARGV[0]; my $seed = $ARGV[1]; my $key = substr(crypt($pwd,$seed),2); Those quotes around $pwd

RE: Seeding variables from command line

2005-08-09 Thread Bob Showalter
[EMAIL PROTECTED] wrote: Sorry to bother everyone, but i was working on this yesterday and i couldn't get it to work. I guess i have the wrong syntax for passing variables in from the command line. Here's my script: = crypt.pl = #!/usr/bin/perl my $pwd = $1; my $seed = $2; my

RE: Seeding variables from command line

2005-08-09 Thread Ryan Frantz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 09, 2005 10:39 AM To: beginners@perl.org Subject: Seeding variables from command line Sorry to bother everyone, but i was working on this yesterday and i couldn't get it to work. I guess i

Re: Seeding variables from command line

2005-08-09 Thread Derrick_Ballentine
Thank you all, worked like a charm. Old shell habits are hard to break ;-) Derrick Ballentine Automation Support Specialist District Court - Western Arkansas

popping, shifting or splicing an array???

2005-08-09 Thread DBSMITH
Hello ... I am trying to figure out, which operator to use; pop, shift or splice. My goal is, as an option is selected from user input, pop or splice or shift elements off ( those selected from user input ) and repopulate array with remaining elements. Scenarios: as numbers are selected

Re: popping, shifting or splicing an array???

2005-08-09 Thread Offer Kaye
On 8/9/05, DBSMITH wrote: Hello ... I am trying to figure out, which operator to use; pop, shift or splice. My goal is, as an option is selected from user input, pop or splice or shift elements off ( those selected from user input ) and repopulate array with remaining elements. Hi,

Re: Is there any Makefile.pl example?

2005-08-09 Thread Offer Kaye
On 8/9/05, Yu Wang wrote: Hi, I have written a program using Gtk2 in Perl. It's the first time I write program in Perl, so I need some help in writting the Makefile.pl I have 1 file for main program, and 5 files for modules. Besides that, I also have document files and some data files

Re: popping, shifting or splicing an array???

2005-08-09 Thread DBSMITH
Offer Kaye [EMAIL PROTECTED] .com

RE: Is there any Makefile.pl example?

2005-08-09 Thread Bob Showalter
Yu Wang wrote: Hi, I have written a program using Gtk2 in Perl. It's the first time I write program in Perl, so I need some help in writting the Makefile.pl I have 1 file for main program, and 5 files for modules. Besides that, I also have document files and some data files to be accessed

perl regexp need help!

2005-08-09 Thread Alex
Hello everyone, I need some help to fix a problem in mailgraph.pl script. I'm not a perl programmer, so i hope to find a little help here... I need to translate an old code which is parsing my maillog file, into new one, related to my present needs. The old code has worked with old vexira

RE: perl regexp need help!

2005-08-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Alex wrote: Hello everyone, I need some help to fix a problem in mailgraph.pl script. I'm not a perl programmer, so i hope to find a little help here... I need to translate an old code which is parsing my maillog file, into new one, related to my present needs. The old code has worked

strftime Problem

2005-08-09 Thread Dave Adams
I am trying to get the date stamps of multiple files on a win32 machine using the strftime function in a foreach loop. For testing purpose, I take a single file and get the modification time of it. This works. I then recycle my code and place it in a foreach loop. This fails. Error message

RE: strftime Problem

2005-08-09 Thread Charles K. Clarkson
Dave Adams mailto:[EMAIL PROTECTED] wrote: : I am trying to get the date stamps of multiple files on a win32 : machine using the strftime function in a foreach loop. : : For testing purpose, I take a single file and get the modification : time of it. This works. : : I then recycle my code and

Re: more hashref within array sorting

2005-08-09 Thread Jeremy Kister
On 8/9/2005 8:43 AM, John W. Krahn wrote: Jeremy Kister wrote: I've apparently dumbed down my code and question a bit too much: I have multiple hashrefs in each element of the array, and I need the resulting sorted array to contain all the data in the original array, simply sorted by the value

Re: more hashref within array sorting

2005-08-09 Thread Jeff 'japhy' Pinyan
On Aug 9, Jeremy Kister said: my @s = map $_-[ 1 ], sort { $a-[ 0 ] cmp $b-[ 0 ] } map [ inet_aton( $_-{ N } ), $_ ], @a; Now to analyze WTF we're doing here :) Paul's answer had a slight typo in it -- he was comparing $a-[0], $a-[1], $a-[2], and $a-[3], when he

Re: more hashref within array sorting

2005-08-09 Thread Paul Johnson
On Tue, Aug 09, 2005 at 05:00:44PM -0400, Jeff 'japhy' Pinyan wrote: On Aug 9, Jeremy Kister said: my @s = map $_-[ 1 ], sort { $a-[ 0 ] cmp $b-[ 0 ] } map [ inet_aton( $_-{ N } ), $_ ], @a; Now to analyze WTF we're doing here :) Paul's answer had a slight

Re: strftime Problem

2005-08-09 Thread Chris Charley
Hi Dave I can get it to work if I do not include use Time::localtime. Wonder why it worked for you in the first instance? Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: Join Function

2005-08-09 Thread Christer Ekholm
Vineet Pande [EMAIL PROTECTED] writes: hi, In the following code which reads a file.txt (SEE ATTACHMENT) where I am trying to understand how to put the DNA sequence in to a single string... print enter file with DNA sequence: ; $seqfile = STDIN; chomp $seqfile; unless ( open(DNAFILE,

Re: perl regexp need help!

2005-08-09 Thread Jay Savage
On 8/9/05, Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] wrote: Alex wrote: Hello everyone, I need some help to fix a problem in mailgraph.pl script. I'm not a perl programmer, so i hope to find a little help here... I need to translate an old code which is