Re: Weird CGI.pm issue

2010-01-08 Thread Bruce Ferrell
Shawn H Corey wrote: > Bruce Ferrell wrote: >> Somehow my data is being transformed. >> >> The CGI code is: >> >> #/bin/perl >> >> use CGI::Util qw( escape unescape make_attributes ); >> use CGI; >> use CGI qw( escapeHTML ); >> >> my $q= new CGI; >> >> my $data

Re: Weird CGI.pm issue

2010-01-08 Thread Shawn H Corey
Bruce Ferrell wrote: > Somehow my data is being transformed. > > The CGI code is: > > #/bin/perl > > use CGI::Util qw( escape unescape make_attributes ); > use CGI; > use CGI qw( escapeHTML ); > > my $q = new CGI; > > my $data = $q->param( 'POSTDATA' ); >

RE: Weird CGI.pm issue

2010-01-08 Thread Grove, Michael
param( 'POSTDATA' ); ADD 6ec973aa3f7a96e43f86b8d2aea0585ba3096c28 5551313 SMS 15551212 Test message sent from script %%DNAME%% %\xdaTE%% ALERT ADD 6ec973aa3f7a96e43f86b8d2aea0585ba3096c28 5551313 SMS 15551212 Test message sent from script %%DNAME%% %%DATE%% ALERT http://learn.pe

Re: weird post problem

2009-10-18 Thread Uri Guttman
> "JG" == Jim Gibson writes: >> print "Content-type: text/html\n\n"; >> $forminfo = ; >> >> @key_value_pairs = split(/&/,$forminfo); >> foreach $pair (@key_value_pairs){ >> ($key,$value) = split(/=/,$pair); >> $value =~ s/\+/ /g; >> $value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack(

Re: weird post problem

2009-10-18 Thread Jim Gibson
At 5:45 AM +0200 10/18/09, adlai burman wrote: Hello and help, please. This is actually a CGI/Perl issue I am having but Perl seems to be the closest forum here. I am having a very simple (hence very frustrating) problem with a CGI/ Perl script. For some reason if I pass things from a checkbox t

Re: Weird Regular expression.

2007-10-05 Thread John W. Krahn
ash wrote: Hello fellow scripters! Hello, I've come across weird regex like this: (.{4}).(.{21}).(.{3})..(.{3}). (.{10}).(.{9}). Has anyone any idea about the syntax of these regex? Thank you for your help. The period (.) matches any character except the newline character unless the /s opt

Re: weird external program output

2005-12-02 Thread Beast
John W. Krahn wrote: You do realise that putting executable scripts in /tmp is a huge security risk? Yes, the actual script is on different location, this is just for testing only. return $ret || ""; } When run using cmmondline, it works (gives the correct output), but when scheduled

Re: weird external program output

2005-12-02 Thread John W. Krahn
Beast wrote: > > Hi all, Hello, > I have problem in perl script when executing external bash script using > backtick. > > > pscript.pl: > > my $resultt = &execute(); > > print "RES: $result\n"; > > > sub execute() { > my $ret = `/tmp/ping_yahoo.sh`; You do realise that putting executabl

Re: weird return

2005-08-03 Thread Brent Clark
Brent Clark wrote: Brent Clark wrote: Hi list I have my code as so: for my $roomCode ( keys %{ $ref_hash->{$fileName} } ){ my $roomName = $ref_hash->{$fileName}{$roomCode}; if( $pCode eq 'p110'){ if ($p110rm01 eq $roomName ){ $finalHash{$fileName}[0] = $roomName;

Re: weird return

2005-08-03 Thread John Doe
Brent Clark am Mittwoch, 3. August 2005 10.43: > Hi list Hi > I have my code as so: > > for my $roomCode ( keys %{ $ref_hash->{$fileName} } ){ > my $roomName = $ref_hash->{$fileName}{$roomCode}; > if( $pCode eq 'p110'){ > if ($p110rm01 eq $roomName ){ >

Re: weird return

2005-08-03 Thread Brent Clark
Brent Clark wrote: Hi list I have my code as so: for my $roomCode ( keys %{ $ref_hash->{$fileName} } ){ my $roomName = $ref_hash->{$fileName}{$roomCode}; if( $pCode eq 'p110'){ if ($p110rm01 eq $roomName ){ $finalHash{$fileName}[0] = $roomName; my Data::Dumpe

Re: weird

2004-06-15 Thread Jeff 'japhy' Pinyan
On Jun 14, Randy W. Sims said: >I've always thought that behaviour kinda weird myself (though now it's >become second nature). I like the way Ruby has two versions for chop/chomp: > >newstring = str.chomp; # leave original untouched >str.chomp!;# update original inplace > >Of course, m

Re: weird

2004-06-14 Thread Randy W. Sims
John W. Krahn wrote: I don't think you understand how chomp() works: perldoc -f chomp chomp VARIABLE chomp LIST chomp This safer version of the chop entry elsewhere in this document removes any trailing string that corresponds to the current value of `$/' (also

Re: weird

2004-06-14 Thread John W. Krahn
Mandar Rahurkar wrote: > > Hi, Hello, > I have attached my routine and its output. I dont understand the > output differemce between the @subj and $subjectno ? Why do I lose the > trailing zeros ? > > Thanks Mandar > > @subj= cat somefile.txt > print @subj; > > foreach (@subj) { > $subj

Re: weird

2004-06-14 Thread JupiterHost.Net
@subj= cat somefile.txt print @subj; foreach (@subj) { $subject_no=chomp($_); This assigns the return value of chomp() to the variable not the chomp'ed version of $_; perldoc -f chomp Try this, it works the the same each time : perl -mstrict -we 'my @subj = ("01\n","02\n","03\n");print @subj

Re: weird math

2004-05-28 Thread Andrew Gaffney
Kevin Old wrote: On Thu, 2004-05-27 at 23:31, Andrew Gaffney wrote: I am writing a program to parse a CSV file downloaded from my bank. I have it keep a running balance, but I'm getting a weird total. Apparently, -457.16 + 460.93 = 3.769998. But when 20 is subtracted from that, I get -16.

Re: weird math

2004-05-28 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Andrew Gaffney) writes: >I am writing a program to parse a CSV file downloaded from my bank. I have it >keep a running balance, but I'm getting a weird total. Apparently, -457.16 + >460.93 = 3.769998. But when 20 is subtracted from that,

Re: weird math

2004-05-28 Thread Rob Dixon
Hi Andrew. Andrew Gaffney wrote: > > I am writing a program to parse a CSV file downloaded from my bank. I have it > keep a running balance, but I'm getting a weird total. Apparently, -457.16 + > 460.93 = 3.769998. But when 20 is subtracted from that, I get -16.23. > There are no weird

Re: weird math

2004-05-28 Thread Paul Johnson
On Thu, May 27, 2004 at 10:31:08PM -0500, Andrew Gaffney wrote: > I am writing a program to parse a CSV file downloaded from my bank. I have > it keep a running balance, but I'm getting a weird total. Apparently, > -457.16 + 460.93 = 3.769998. But when 20 is subtracted from that, I > ge

Re: weird math

2004-05-28 Thread Kevin Old
On Thu, 2004-05-27 at 23:31, Andrew Gaffney wrote: > I am writing a program to parse a CSV file downloaded from my bank. I have it > keep a running balance, but I'm getting a weird total. Apparently, -457.16 + > 460.93 = 3.769998. But when 20 is subtracted from that, I get -16.23. > Ther

Re: weird math

2004-05-28 Thread John W. Krahn
Andrew Gaffney wrote: > > I am writing a program to parse a CSV file downloaded from my bank. I have it > keep a running balance, but I'm getting a weird total. Apparently, -457.16 + > 460.93 = 3.769998. But when 20 is subtracted from that, I get -16.23. > There are no weird numbers like t

Re: weird math

2004-05-28 Thread Wiggins d Anconia
> I am writing a program to parse a CSV file downloaded from my bank. I have it > keep a running balance, but I'm getting a weird total. Apparently, -457.16 + > 460.93 = 3.769998. But when 20 is subtracted from that, I get -16.23. > There are no weird numbers like that in my input data.

Re: weird math

2004-05-28 Thread Jeff 'japhy' Pinyan
On May 27, Andrew Gaffney said: >I am writing a program to parse a CSV file downloaded from my bank. I have it >keep a running balance, but I'm getting a weird total. Apparently, -457.16 + >460.93 = 3.769998. But when 20 is subtracted from that, I get -16.23. >There are no weird numbers li

Re: weird math

2004-05-28 Thread Angie Ahl
On 28 May 2004, at 04:31, Andrew Gaffney wrote: I am writing a program to parse a CSV file downloaded from my bank. I have it keep a running balance, but I'm getting a weird total. Apparently, -457.16 + 460.93 = 3.769998. But when 20 is subtracted from that, I get -16.23. There are no we

Re: weird Perl errors

2004-03-19 Thread Andrew Gaffney
Randy W. Sims wrote: On 03/19/04 00:58, Andrew Gaffney wrote: I keep getting the following errors in my Apache error log every time a certain script is run: Prototype mismatch: sub Apache::ROOT::cgi_2dbin::showday_2epl::time2str vs ($;$$) at /usr/lib/perl5/5.8.0/Exporter.pm line 59. at /home/

Re: weird Perl errors

2004-03-18 Thread Randy W. Sims
On 03/19/04 00:58, Andrew Gaffney wrote: I keep getting the following errors in my Apache error log every time a certain script is run: Prototype mismatch: sub Apache::ROOT::cgi_2dbin::showday_2epl::time2str vs ($;$$) at /usr/lib/perl5/5.8.0/Exporter.pm line 59. at /home/httpd/cgi-bin/showday.p

Re: Weird printing . . .

2003-10-22 Thread Steve Grazzini
On Wed, Oct 22, 2003 at 02:26:50PM -0400, Steve Grazzini wrote: > #!/usr/bin/perl > # > # [ untested ] > # And it shows... :/ > die "Usage: $0 ERROR\n" unless @ARGV; > > my $num = shift; > my $rx = qr/^#error$num$/; > > while (<>) { > my $range = /$rx/ .. /$rx/; You'd a

Re: Weird printing . . .

2003-10-22 Thread Steve Grazzini
On Wed, Oct 22, 2003 at 12:59:33PM -0500, Jason wrote: > I have a file formatted like this: [ snip ] > #error12 > # Couldn't set the transfer mode to binary. > #error12 > > I want to write code that searches for an error number, and then > prints everything in between the two error number lab

Re: Weird problem with writing to PostgreSQL through DBI

2003-01-29 Thread Ben Siders
Nevermind. Got it figured out. Turns out I had a bad environment variable that was trying to insert into a parallel DB in which the ref_id field was defined as 'integer' instead of 'text'. Ben Siders wrote: I am parsing some XML and trying to write the tags to a table. Here is the table (Po

Re: weird problems (dunno a good subject)

2002-12-09 Thread Ramprasad A Padmanabhan
why bother , play america's army a little later; let kde finish ;-) anyway you should be catching signals ( like ctrl-c ) in your script and reset all environment variables and try giving a way so that the next time you car run the script and it picks up from where it had left Christopher J

Re: weird problems (dunno a good subject)

2002-12-08 Thread simran
sounds like some needed program/script is in your PATH when you run the script but not when you are in the shell... are you modifying your PATH variable in your script? On Mon, 2002-12-09 at 12:23, christopher j bottaro wrote: > hello again, > i wrote a perl script to compile and install kde for

Re: weird problem

2002-09-18 Thread John W. Krahn
Ron Woodall wrote: > > Hi All: Hello, > This is a convoluted problem and I hope I can describe it properly. > > I have about 90 html pages. I am extracting a small amount of > information from each page and using that to create 90 more pages elsewhere > in the site. > >

Re: Weird problem with a regexp.

2002-09-17 Thread david
Steve wrote: > > > Oops, that if should be which is still giving me the error: > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Session > oh, another problem is that if you are using: mm-dd- hh:mm:ss directly to Date::Manip's ParseDate() function, it won't work. if you have sa

Re: Weird problem with a regexp.

2002-09-17 Thread david
Steve wrote: > > > Oops, that if should be which is still giving me the error: > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Session > i don't see why your expression won't work. prehaps it's something else that isn't working... david -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Weird problem with a regexp.

2002-09-17 Thread Steve
At 12:54 PM 9/17/02 -0700, you wrote: >Steve wrote: > > > I have this snippet of code which works fine. $start_time has MM-DD- > > HH:MM:SS.MM which is what I want. > > > > # > > > > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Connection > > Establ

Re: Weird problem with a regexp.

2002-09-17 Thread david
Steve wrote: > I have this snippet of code which works fine. $start_time has MM-DD- > HH:MM:SS.MM which is what I want. > > # > > if ($line =~ /^(\d\d-\d\d-\d{4}\s+\d\d:\d\d:\d\d\.\d\d).+Connection > Established.+(\d\d\d\d\d)/i) { > $start_time = $1

Re: weird characters

2002-04-03 Thread Michael Kelly
On 4/3/02 4:02 PM, Pedro A Reche Gallardo <[EMAIL PROTECTED]> wrote: > Hi, I have a cgi script that uploads files but I have found that when > those files are uploaded from a Mac or Windows the return character > (maybe other characters too) are replaced by something else. Does any > one know how

RE: weird characters

2002-04-03 Thread Timothy Johnson
I'm not 100% sure on the Mac, but I know that Windows puts a CRLF (\r\n) instead of just the unix newline (\n). -Original Message- From: Pedro A Reche Gallardo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 4:03 PM To: [EMAIL PROTECTED] Subject: weird characters Hi, I hav

Re: Weird characters between words in a database key

2002-03-06 Thread Jenda Krynicky
From: "Jay M" <[EMAIL PROTECTED]> > I am attempting to modify a large existing set of scripts. All of > these scripts use dbmopen/close to create databases. > > when a database record is created and the key contains multiple > words/variablels i.e. $DATABASE{"How" , "Are", $Yo

Re: Weird (or eof?) characters screwing up my file read?

2001-12-17 Thread John W. Krahn
Gary Hawkins wrote: > > I'm reading a 25 meg file that contains the content of web pages and their > urls. The entire content of the file is placed in an array and then > worked-over from there. (I know there are faster ways but ran into a loop snag > with $/ redefine). > > The problem is that

Re: weird forks

2001-10-25 Thread smoot
> Maxim Goncharov <[EMAIL PROTECTED]> said: > I ran into the problem with forking and I am not able to figure out what > happens. Here is the code (let's call the program server): > > $pid = open(HHH,"|- "); > if($pid){ > print HHH "something\n"; > }else{ > exec "client" > } > > Notice that