Extended regexp help to fix a potential bug with DBI::Shell

2002-10-18 Thread Robert Thompson
gexps too much, so I thought this would be a good learning experience, and hopefully fix a module in the process. If I am misunderstanding how to use DBI:Shell, let me know as well. Thanks, =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Extended regexp help to fix a potential bug with DBI::Shell

2002-10-18 Thread Robert Thompson
have seen others just do a diff of the files. Is there any etiquette to such a thing or is the below acceptable? >$ diff Shell.pm ~/bak.Shell.pm 356c356 < (? $prefix Thanks, =-= Robert Thompson On Thu, Oct 17, 2002 at 02:23:46PM -0400, Jeff 'japhy&#x

Re: So what is munging?

2002-07-29 Thread Robert Thompson
and in the 1940s, and in Yorkshire in the 1950s, as a verb, meaning to munch up into a masticated mess, and as a noun, meaning the result of munging something up..." Incidently, I thought munge was mung... learning is. =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Hi, newbie question

2002-07-25 Thread Robert Thompson
In vi, you have to type ctrl-v ctrl-m. This will tell vi you mean control-m and not carrot-m. :%s///g =-= Robert Thompson > > Even in vi when i do a search for ^M by doing '/^M' it says that no matches were >found. The ^M is not two characters but one. Can anyone out t

Re: Easy way to compare 2 perl lists (arrays)?

2002-07-10 Thread Robert Thompson
== 2; # One pdf # $exists{$_} == 3; # One tiff and one pdf print join('\n', grep { $exists{$_} == 1 } keys %exists), "\n"; __END__ =-= Robert Thompson On Wed, Jul 10, 2002 at 11:19:04AM -0400, Chas Owens wrote: > On Wed, 2002-07-10 at 10:17, Rupert Heesom w

Re: Opening files for writing that dont exist

2002-07-02 Thread Robert Thompson
> For temp files, you may try using time, plus users IP, that would near 0% that you >will have the risk to write to an existed file... You can also use the process ID (PID) of the perl script as part of the filename. This is stored in the $$ variable: my $tempfile = "/tmp/myscript.$$.tmp"; #

Re: getting data from one table, putting it into another...

2002-06-26 Thread Robert Thompson
This is more of an MySQL question than a Perl question, but here goes: A possible error is that you are inserting into the same table you are selecting from. > my $sth = $dbh->prepare( "SELECT * FROM board where serial='CN+/P422'" ) || > my $sth2 = $dbh->prepare("INSERT INTO board @abfrage")

Re: search-engine, searching for 2 words

2002-06-26 Thread Robert Thompson
It sounds like either use strict or use warnings (-w on the shebang line) is causing the error. If you add: $found{$file}{1} = 0; $found{$file}{2} = 0; before the two if's, that should suppress the error message (hopefully). What I think was happening is that one of the strings never m

Re: search-engine, searching for 2 words

2002-06-25 Thread Robert Thompson
> So in short : > I want to match 2 words within .txt documents, if the document contains BOTH words >I'dd like to print it. I am assuming you mean strings, whereas a word would be surrounded by space ala: /\s$word\s/. To rephrase what you want a little, you want to track how many times

Re: talking to mysql

2002-06-04 Thread Robert Thompson
I use this online reference to double check my SQL syntax (no pun intended) and data types: http://www.mysql.com/documentation/mysql/bychapter/manual_toc.html Especially: "6 MySQL Language Reference" AFA perl, use DBI. =-= Robert Thompson On Tue, Jun 04, 2002 at 05:26:24PM -050

Passing array to subroutine problem

2002-06-04 Thread Robert Thompson
/test.array.passing.pl oneis all good two[0] is zero two[1] is one one is bad two[0] is default two[1] is 1 oneis more bad two[0] is default two[1] is 1 I am thinking the unless is failing, but I can't find out why, so I come to the gurus... Thanks for your time, =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Sending Faxes

2002-01-29 Thread Robert Thompson
with this? Is porting a script from Win32 to *nix viable/easy? Thanks, =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reference problem

2002-01-05 Thread Robert Thompson
text in the begining of the variable, with no success. I need the output to be in the form "one_1", "one_2", "two_8", "three_11", etc. I can just write a different foreach loop for each array, but that seems redundant. Thanks, =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Data::Dumper and eval question

2001-12-11 Thread Robert Thompson
deas? Has the problem been described well? Thanks for your time, =-= Robert Thompson On Tue, Dec 11, 2001 at 10:47:42AM +, Daniel Gardner wrote: > Tuesday, December 11, 2001, 1:09:06 AM, Robert Thompson wrote: > > > I am using Data:Dumper in a script and am running into a

Data::Dumper and eval question

2001-12-10 Thread Robert Thompson
(eval 3) line 1, chunk 1. >head -3 template.test.html $datadumperfile = "test.data"; # The file with the Data::Dumper database. $outfile = "test.html"; # The final output file. DATA BELOW HERE >cat test.data $Test01 = "Foo Baz&quo

Re: comand line arguments, but with web

2001-11-16 Thread Robert Thompson
"POST\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; if ($ENV{'REQUEST_METHOD'} eq "GET") { $form_data = $ENV{'QUERY_STRING'}; } else { $form_data = ; } print "\n";

Re: Explanation of a Cookbook script and some further questions

2001-11-09 Thread Robert Thompson
but it get's the job done. Comments welcome, but no news is good news. #!/usr/bin/perl my $num = reverse $ARGV[0]; if ($num =~ /\./) { unless ($num =~ /^[0-9]{2}\./) { print "Error\n"; exit(1); } } $num =~ s/([0-9]{3}) (?=\d) (?!\d*\.)/$1,/xg; print scalar reverse $num;

Explanation of a Cookbook script and some further questions

2001-11-09 Thread Robert Thompson
is that if I put "[0-9]{0,2}\.?", "10." fails since the period is optional. I guess I could use printf to change 10. into 10.00, but I would like to produce an error incase of mistypes instead of destroying data. Thanks, =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Outputting shell command to a browser

2001-10-31 Thread Robert Thompson
0h37m56s IN PTR www.linux.org. " test: foo result: "100.39.239.216.in-addr.arpa. 23h59m16s IN PTR www.google.com. " test: foo Here is the source code from the page that is generated, the values are blank:

Uniq'ing an array (previously Re: Search matching problems)

2001-10-30 Thread Robert Thompson
something more simple that will handle this. Thanks for your time, =-= Robert Thompson On Tue, Oct 30, 2001 at 03:52:44AM +0100, Andrea Holstein wrote: > Robert Thompson wrote: > > ... > > > > for (my $i = 0; $i < @mess_order; ++$i) { > > if ($

Search matching problems

2001-10-29 Thread Robert Thompson
tter list to send this to, then please let me know. I could not find an appropriate one on http://lists.cpan.org/, so please clue me in. =-= Robert Thompson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]