Re: HTML::Parser question

2002-09-26 Thread Ron Grabowski
use strict; use HTML::Parser 3.00 (); Thank you for posting some HTML::Parser code. For as long as I've been doing Perl I've only seen real HTML::Parser code a handful of times. People are quick to say just use HTML::Parser. If most people are anything like me, I just end up using some regexs

Re: Error with $Response-Flush()

2002-09-26 Thread Ron Grabowski
And as you mentioned the 256 bytes most definetely need to be sent before anything will flush. It is actually Internet Explorer that needs to receive 256 bytes before displaying anything. If you test your page with a different browser (like Mozilla), you'll see that the Flush() works with

Re: perl module for 'clicking' links??

2002-09-04 Thread Ron Grabowski
TC Winquist wrote: I searched CPAN for a module that would emulate clicking a link on a web page. Let's say I know that I want to click the link a href=r/foPhotos/a on yahoo's index page. I would like a script that would emulate that click and load the resulting page into the web browser

Re: LWP and ASP Pages

2002-08-26 Thread Ron Grabowski
[EMAIL PROTECTED] wrote: I'm trying to test to make sure my web site is up by connecting to the admin web page of my application. The admin web page is an ASP page and whenever I set it up using: use HTTP::Request; use LWP::UserAgent; $filename = D:\\temp\\msi.html; $ua =

Re: easy user input interface into Perl

2002-08-26 Thread Ron Grabowski
the real/regular program will then use for input. It asks the user only two short text questions. Of course any of us would be quite happy You could check out Win32::GUI (see HTML under .../html/lib/win32) or maybe use Tk as an alternative GUI interface - except it may not be installed

Re: HTTP::Daemon --Send client autoproxy?

2002-08-26 Thread Ron Grabowski
How do I get the details of HTTP::Headers=HASH(0x1c5d150)? What does Data::Dumper say? use Data::Dumper; print Dumper $r-headers; Or just look at the keys: foreach my $key ( keys %{$r-headers} ) { print $key = , $r-headers-{$key}, \n; } ___

Re: How to do CDDB lookup via Win32 Perl?

2002-08-12 Thread Ron Grabowski
I'm having the same problem as described in the following post. Did anyone ever find a solution to this? Read this post again: http://aspn.activestate.com/ASPN/Mail/Message/1312188 Download this file: http://www.freedb.org/software/cddbidgen.zip Run this Perl code: --- use strict; use

Re: trying to understand how regex works

2002-08-12 Thread Ron Grabowski
open FOUT, /some/path/outputfile.txt; open FILE /some/path/inputfile.txt; open(FOUT, /some/path/outputfile.txt) or die(Error: $!); open(FILE /some/path/inputfile.txt) or die(Error: $!); whileFILE{ p=N; next if (/.*?\|value_garbage1\|.*?/ || /.*?\|value_garbage2\|.*?/ ||

Re: problem with djgpp/perl

2002-07-26 Thread Ron Grabowski
1. I downloaded perl542b.zip and csdpmi5b.zip This is a MSDOS/DJGPP port of perl 5.004_02.. The file dates to 1997. There have been many major revisions to Perl in the last 5+ years. Can't locate Socket.pm in @INC (@INC contains: C:\PERL\LIB\PERL5 Socket.pm has been a core ( i.e. it comes

Re: Split function

2002-07-15 Thread Ron Grabowski
I would like to split on either a double dash or a semi colon with one split using ( | ). $_ = 'Hello-world;how--are--you;today'; print join \n, split /--|;/; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe:

Re: Split function

2002-07-15 Thread Ron Grabowski
Would it be only semantic to escape the semicolon, or could it cause a problem not to do so? I'm not asking to be picky, I really don't know. :) The semi-colon is not special unless you do something like this: m;foo|bar|\;; ___ Perl-Win32-Users

Re: Reading from a form

2002-07-09 Thread Ron Grabowski
my $q = new CGI; ## # Get the input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Split the name-value pairs @pairs = split(//, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~

Re: Is there a LPR Module

2002-07-05 Thread Ron Grabowski
PS I would settle for a free command line as well. http://www.weihenstephan.de/~syring/win32/UnxUtils.html ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: If..else scope problem?

2002-06-13 Thread Ron Grabowski
Here's a revised version of your code. It puts the data into a hash, whence you can retrieve it in any order you like (the output line at the end is just an example of one way). I just put everything into the hash and dealt with it later: --- use strict; use warnings; use vars qw(%H);

Re: Win32::IPROC or some other 'ps'

2002-06-10 Thread Ron Grabowski
I've looked in the 'usual' spot (http://www.generation.net/~aminer/Perl/) There doesn't appear to be anything on that website. Otherwise, can any suggest the best way to get a process listing on a Win2000 box via perl? I have a better script someplace but maybe this will do for the time

Re: How can we implement escape sequences in Perl ( Win 32 )

2002-06-05 Thread Ron Grabowski
I would like to implement the escape sequences like ( if the value is Perl, I'm not sure what you are asking. perldoc URI::Escape ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe:

Re: HTML in E-mail

2002-06-05 Thread Ron Grabowski
that somebody would actually get annoyed by the format of an e-mail. Sometimes when people use a client like Outlook, I'm unable to quote their message in my response. I don't think changing the font color to a pretty shade of blue or a non-standard Times New Roman font really adds anything. It

Re: Using both 'Benchmark' and 'strict'

2002-06-03 Thread Ron Grabowski
Is there a simpler way ? --- use strict; use Benchmark; timethese (-1, { one = 'my @one = (1..10); my @two = (11..20); scalar(@one);', two = 'my @one = (1..10); my @two = (11..20); scalar(@two), \n;' }); --- Benchmark: running one, two, each for at least 1 CPU

Re: Text::CSV and empty fields ???

2002-06-01 Thread Ron Grabowski
Michael D. Schleif wrote: When I do this: if ($csv-parse($_)) { @array = $csv-fields; } print scalar @array, \n; I get various values, because some fields in the CSV file are empty. What I want to do is get an array with empty fields, as

Re: comparing two arrays

2002-05-30 Thread Ron Grabowski
[EMAIL PROTECTED] wrote: I have two string arrays (say ar1 and ar2) and I would like to compare them to find out all the strings in ar1 that do not exist in ar2. What's the fastest and most efficient way to do that? I know I can use a couple of for/foreach but I am hoping that there is a

Re: Generating random numbers?

2002-05-28 Thread Ron Grabowski
I have seen a few ok random number generator snippets but none really look like they work too well. Take the two below arrays. http://search.cpan.org/search?mode=modulequery=random Some modules that may be of interest: Math::Random Math::TrulyRandom

Re: Set::Object

2002-05-27 Thread Ron Grabowski
I think it's just a matter of: my $s = Set::Object-new(['a','b']); That did it. Thank you. - Ron ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Problem with win32::OLE - please check this out

2002-05-24 Thread Ron Grabowski
I like to add this to Chuck's response: I recall reading someplace that many of the larger MS applications ( i.e. Word, Excel ) are not suitable to act as OLE servers in a production environment such as a webserver. I don't know if this applies to Outlook. I'll try to look on Google for where I

Re: IE/OLE - properties methods questions

2002-05-24 Thread Ron Grabowski
3) Instead of using Navigate to get a URL or file, can I use HTML that's stored in a scalar in my source code? Can you set the Document to an html string? my $ie = WIn32::OLE-new('InternetExplorer.Application') or die 'Can't create instance of IE'; my $html =

Re: Regex matching pairs?

2002-05-23 Thread Ron Grabowski
--- use strict; use Text::Balanced qw(extract_bracketed); my $text = '{\f2\fs20 Da biste }{\cs6\f1\cf6\lang \{#}RES_ID{\cs6\f1\cf6\lang #\}} odaberite'; my($extracted, $remainder) = extract_bracketed($text,'{}'); print $extracted\n$remainder\n; print(($extracted =~ /^{.*?\s(.*)\s}$/)); ---

Re: FAQ

2002-05-22 Thread Ron Grabowski
Yup - a decent faq and a reminder work rather well for most FAQ's assuming the users read some emails before posting and didn't subscribe just to ask a question. An auto-responder would be unpopular and put new users off, as I don't think there is a need for Yet-Another-FAQ. I think people

Re: connecting via perl to mysql on another windows 2000 box -

2002-05-16 Thread Ron Grabowski
Here is the situation. I have to connect to Mysql running on another windows 2000 box. I have never done this before. Do I set this up in the tables as another host and use the -h parm in command shell and the host parm in my perl scripts? or is there another way to do it? What happens

Re: More or Pager function is Perl

2002-05-16 Thread Ron Grabowski
This is what I use in a program that mimics the Unix head command: http://www.perl.com/language/ppt/src/head/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: HOWTO: break up a directory path name into components ...

2002-05-16 Thread Ron Grabowski
I have a subroutine splitFilename that I wrote that does this for me. It's been enhanced over time to include support for UNC, but this is the meat of that subroutine that handles directory/path/filename strings: Not to be a wet blanket, but isn't File::Basename part of the core? I looked

Re: external program and stdin

2001-07-03 Thread Ron Grabowski
I have an external program that I access with the back tick operator (`program.exe`) -it works fine, but I do not know how to send it certain parameters through stdin after it executes. For example what I really want to do is to execute the program, and then send it some data through stdin.

Re: Include statement..Boy am I a newbie

2001-07-03 Thread Ron Grabowski
In linux it automatically looks in the current directory. However, with windows, it looks to C:/Perl/lib or C:/Perl/site/lib . All versions of Perl look in the global array @INC to see which directories to look for files: perl -v Characteristics of this binary (from libperl): Locally

Re: format+Tk

2001-06-28 Thread Ron Grabowski
My PROBLEM: I want to insert a formatted test , I mean the resulting of the format command . if I use write every line will go on the STDOUT but I want to get all the columns well formatted inside the $TextMessage. I know it is not clearbut if you manage to understand what I am trying

Re: format+Tk

2001-06-28 Thread Ron Grabowski
My PROBLEM: I want to insert a formatted test , I mean the resulting of the format command . if I use write every line will go on the STDOUT but I want to get all the columns well formatted inside the $TextMessage. perlform lead me to this: --- use Carp; sub swrite { croak usage: swrite

Re: A few uncivil remarks..........

2001-06-11 Thread Ron Grabowski
Lee Goddard wrote: I reckon PLEASE READ THE FAQ and a url should appear at the top of every AS post, not just a URL a the bottom No, not at the TOP! I don't need another thing to scroll down through before I get to something meaningful. Instead of just giving code, I like to refer

Re: A few uncivil remarks..........

2001-06-11 Thread Ron Grabowski
Just curious... since this was not a response but rather a new thread, was there a particular offense that got your underwear in a bunch, or did you just wake up a bit cranky? The problem is that some people refuse to look for information on their own. I can't tell you how many times this

Re: Hex bytecount??

2001-06-11 Thread Ron Grabowski
# here I need to get contents of $ray[0x209] in DECIMAL so I can know how many following bytes are relevant. Thoughts... options?? How many bytes long is the length word ? It sounds like he just wants $ray[ hex(0x209) ] but unpack does seem to make more sense that splitting each line

Re: Pass To Module

2001-06-11 Thread Ron Grabowski
As I am learning how to try and use modules today, I ran into a strange Eventually this entire list is going to be PerlEx experts thanks to Scott's posts :-) I know how frustrating it to do simply tasks with unfamiliar software. MY MAIN CALLING SCRIPT IN WHICH I WANT TO PASS HOST AND

Re: FTP Connections

2001-06-11 Thread Ron Grabowski
to the server if the connection is severed, currently I use WS_FTP (those who use this know what I mean). SmartFTP is a full-featured freeware FTP client that has its own scripting language: http://www.smartftp.com ___ Perl-Win32-Users mailing

Re: Getting text from HTML pages

2001-06-08 Thread Ron Grabowski
my ($text)=$htmlstring=~/\p\(.*)/i; I think he wanted everything in the file. The Cookbook says: % perl -pe 's/[^]*//g' file ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: Interacting with COM+ w/ Perl?

2001-05-30 Thread Ron Grabowski
' We have the database so lets set the properties that we want. CompObject.Value(ConstructionEnabled) = True CompObject.Value(ConstructorString) = Chr(34) + Provider=SQLOLEDB;Driver={SQL Server};User ID=momma;Password=;DATABASE=BigDog;SERVER= strServer ; + Chr(34) Anyone heard of

Re: Dictionary object problem with PerlScript ASP

2001-05-10 Thread Ron Grabowski
Here's the VBScript version of some code I am trying to write in PerlScript. (I don't want to use VBScript full-time) VBScript is a lot faster than Perlscript when it comes to ASP. $Response-Redirect($dGatewayConfig-Item(foo)); use Data::Dumper; $Response-Write(PRE . Dumper( $dGatewayConfig

Re: Converting Word / Excel to PDF

2001-05-10 Thread Ron Grabowski
Anyone know of a why to do this in Perl? I want to create a web interface where you upload a Word/Excel document and downloaded a PDF version. Adobe provides a service that does exactly this, for a nominal fee. See (http://cpdf.adobe.com). They handle Word, Excel, and a few other

Re: Reading a file from point A to B

2001-04-16 Thread Ron Grabowski
my( $var ); while( ) { $var = $_ if ( m!SNML_BYLINE! .. m!/SNML_BYLINE! ) == 2; # Other line-by-line processing, if any, goes here. } For those who are boggled by that, its explained in the Cookbook: while () { if (/BEGIN PATTERN/ .. /END PATTERN/) { # line falls

Re: Having Problem with zero's dropping on left side of decimal placeHELP!

2001-04-12 Thread Ron Grabowski
$RECNUM = 0; $RECCOUNT = 0; while(! $RS-EOF) { for ( $i = 0; $i $Count; $i++ ) { $tmp = $RS-Fields($i)-value; $tmp =~ s/\s+$//; # trim trailing white space $amt = $tmp; # No datachecking here! To

Re: net::telnet

2001-04-11 Thread Ron Grabowski
$telnet-cmd("su"); su should require a password so normal users cannot arbitrarly becomeroot.

Re: Optional Arguments

2001-04-10 Thread Ron Grabowski
of null value to indicate that it would not be used. I have tried passing under, "", '', " I think undef is your best bet: Depth( undef, undef, 'True', undef ); sub Depth { foreach my $param ( @_ ) { print "$param\n" if $param; } } Depth($Dir,\%Files,'',15); The third

Re: The Perl Journal - Dead for good?

2001-04-10 Thread Ron Grabowski
Does anyone know if TPJ is officially "dead" ? When this discussion popped up on Slashdot I hurried up and ordered some back issues and recieved them a few weeks ( well more than a few ) later. As far as I know there aren't going to be any new issues published. Which is a real shame, that was

Re: Is there a better way to code my templating system?

2001-04-08 Thread Ron Grabowski
templating system to be called as an exec cgi on a Unix server. My concern is, am I creating too much overhead, in that the perl interpreter with load every time a page loads? Is this the smartest approach under these circumstances or am I missing something obvious (no suprise) that would

Re: Perl cleaning MS Word HTML

2001-04-06 Thread Ron Grabowski
Anyone who's looked at Word docs saved as HTML knows it's frankly terrible. I'm doing a lot of converting these HTML docs to XML, and wonder if anyone has any effective routines to do the job? If not, I'll try to get some stuff on CPAN (always fun).

Re: Question about displaying records from last to first

2001-04-06 Thread Ron Grabowski
@file = A; @file = reverse A; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: Help with leading zeros!

2001-04-06 Thread Ron Grabowski
for ( $i = "001"; $i lt "501"; $i++ ) I think there's something to be said about using numbers that are really strings as numbers. Specifically that it might not be the RightThing to do. There seems to be an aweful lot of unnecessary conversion going on. printf()'s formatting was designed for

Re: Help with leading zeros!

2001-04-06 Thread Ron Grabowski
close STDERR; open (STDERR, "NUL"); That's what I wanted to do. timethese( 5000 , { 'NumsAsStrings' = 'for ( $i = "001"; $i lt "501"; $i++ ) {print STDERR $i}', 'NumsAsNums1' = 'for ( 1 .. 501 ) {printf STDERR "%03d", $_};', 'NumsAsNums2' = 'for ( $i=1; $i501;$i++)

Re: regexp matching more unpredictable in ActivePerl?

2001-04-04 Thread Ron Grabowski
I am no regex expert, but maybe it has to do with the underlying regex engine (i.e. NFA, DFA etc) and the implicit/explicit greediness of that engine for the specific boxes used. Regardless of the implimentation of the engine, we should at least be getting the same results across different

Re: Term::ANSIColor

2001-03-17 Thread Ron Grabowski
?[1;34mThis text is bold blue. ?[0mThis text is normal. ?[33;45mYellow on magenta. ?[0mThis text is normal. in the dos box. Do I need to change something in my environment variables? This question was asked last week(?). Phillip noted that the DOS box needs an ANSI driver in order to know

Re: Problems sending a email with perl!!

2001-03-17 Thread Ron Grabowski
was sent with success but i'm not receiving the message i sent to me just Does Mail::Sender have a debug=1 parameter? Net::SMTP does. Perhaps you could look at the output from that or check the mail in the perl@ mailbox to see that none of the messages got returned.

Re: [Perl-win32-users] Adding items to an array

2001-03-15 Thread Ron Grabowski
I have an array that I'm adding to it every time I see an item, but it is not adding it's appending to the array? I did not see push() or unshift() anywhere in your code. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED]

Re: style

2001-03-15 Thread Ron Grabowski
Is there a more eloquent way to append .txt to a (string) variable please? $file=$invar1; $file.=".txt"; $file = "$invar.txt"; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: Q: Using splice on a matrix

2001-03-13 Thread Ron Grabowski
$row_elements = $#list4; splice(@new_list,0,$row_elements,splice(@matrix,2,$row_elements)); Why not make a function called remove_row() which accepts a reference to a matrix, and a row to delete. You've already written the code for it... ___

Re: How to interact with Exchange Server?

2001-03-12 Thread Ron Grabowski
I use it all the time, and have found the docs more than adequate to get started. I think a lot of people on the list could benefit from some sample scripts. We have Active Directory and Exchange running on several machines at the office. I've installed the LDAP module successfully but I'm

Re: bad logic

2001-03-08 Thread Ron Grabowski
sub Get_Input { print "\nEnter Job Type ['L' to list]: "; chomp($type=STDIN); if ($type eq "l" || $type eq "L") {system "type golist.idx | more";Get_Input()} It looks like your making a recursive call to Get_Input() here. Why not do something like: # untested print "\nEnter Job Type

Re: include file help request

2001-03-06 Thread Ron Grabowski
i have used the code below in linux and it works fine but on porting to win32 it's a problem What is the problem? eval `cat tele.conf`; C:\cat The name specified is not recognized as an internal or external command, operable program or batch file. Try this instead: require "tele.conf";

Re: FW: Q: sorting a list of lists with eval

2001-03-06 Thread Ron Grabowski
delimited with " to '. Does it make any difference? Not really, but as I'm parsing the code in my head I know that as soon as I hit a ' I can expect the following text to be a string so I don't have interpolate it in my head. There have been arguments on comp.lang.perl.misc about single and

Re: operator help

2001-03-06 Thread Ron Grabowski
@operators = ("\","\\=","\=","\!\=","\\=","\"); ### lets say user chose $operators[0] () and it is now stored in $fOp1 if ($fromTime $fOp1 $fTime); { something(); } @op = qw| = = != = |; if ( eval "$fromTime $op[0] $fTime" ) { print `perldoc -f eval`; }

Re: Problem with scallar assignment

2001-03-06 Thread Ron Grabowski
What I want to do is to assign $listed_object = $form{'option'}, thus having 'domain' as value for $listed_object. So far no problem, of course. But later down I have a scallar $domain (along with several others) to which is assigned my Access field and a bit further yet, I want the value

Re: FW: Q: sorting a list of lists with eval

2001-03-06 Thread Ron Grabowski
Not really, but as I'm parsing the code in my head I know that as soon as I hit a ' I can expect the following text to be a string so I don't have interpolate it in my head. There have been arguments on comp.lang.perl.misc about single and double quotes. I must be thinking to fast again:

Re: Q: sorting a list of lists with eval

2001-03-05 Thread Ron Grabowski
# create test data matrix @data_line = @data_matrix = (); @data_line = ("1","26","0","0","2","","0","0","Long","","0","Thomas","Tom"); #@data_line = ("1","26","0","0","2","","0","0","Long","","0","","Tom"); push @data_matrix, [ @data_line ]; @data_line =

Re: IIS 5

2001-03-03 Thread Ron Grabowski
The only way I know of that works is to assign a specific I.P. address to each real or virtual website. You could run some 65,000 different sites on the same IP address as long as each site listened for requests on a distinct port. ___

Re: CGI Timeout after 5 mins. Sound familiar to anyone?

2001-03-03 Thread Ron Grabowski
headtitleCGI Application Timeout/title/head bodyh1CGI Timeout/h1The specified CGI application exceeded the allowed time for processing. The server has deleted the process. 5 minutes seems like an aweful long time for a CGI request anyway. I can't imagine what a CGI script could be doing in

Re: DLL created with VB

2001-03-03 Thread Ron Grabowski
I created a DLL with VisualBasic 6.0 and want to access it with Perl. In the documentation I found how to access the WinApi and Dlls created with 'C' and it is working on my W2K-machine. If you compile it as an ActiveX DLL: use Win32; my $object = CreateObject("NameOfProject.ClassName");

Re: sort problem

2001-03-02 Thread Ron Grabowski
I'm not actually printing $_ but doing some more parsing, I wanted to keep the example short. use Data::Dumper; my %jobs; while ( DATA ) { /(\d\d\d\d)/ push @{$jobs{$1}}, $1; } print Dumper \%jobs; __DATA__ |- |JT# | || |1780| |1776| |1781| |1778| |1785| |1787| |1788|

Re: Where's the faq ?

2001-03-01 Thread Ron Grabowski
I'm trying to read the Active state FAQ http://www.activestate.com/Support/ActivePerl/index.html ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: regular expression please - help

2001-03-01 Thread Ron Grabowski
not elegant but this should work: $res[0] = substr($data, 0, 3); $res[1] = substr($data, 3); substr() is zero based so to get the third character to the end of the line you'll have to start at position 2: $res[1] = substr($data, 2); ___

Re: REGULAR EXPRESSION IN SPLIT FUNCTION - PLEASE HELP ME.

2001-03-01 Thread Ron Grabowski
From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] [ Grrr, just post to one list! ] ($a,$b) = $x =~ /(.{3})(.*)/; Shouldn't you be pushing that stuff into an array as each time

Re: I need Faster way than s/bla/bla/i to remove string. Does tha t exist?

2001-03-01 Thread Ron Grabowski
[ I don't have the original posters email at this terminal ] if you are building for speed avoid $, $' and $` as they make copies of If you really really needed it to be fast you might look into writting it in C using PCRE ( Perl Compatible Regular Expression ).

Re: use strict

2001-02-24 Thread Ron Grabowski
Does 'use strict' mean that i cannot have a global variable and is forced to use lexical variables everytime? You can declare global lexical variables by doing: my($global1,$global2); at the top of your program. Or you can make package(?) wide variables with: use strict; use vars

Re: passing Arguments to wanted

2001-02-24 Thread Ron Grabowski
i get the error: "invalid top directory at c:/perl/lib/file/find.pm line 279, DATA line 1. Are you sure d:/PERLUSER is a directory on your hdd ? ___ Perl-Win32-Users mailing list [EMAIL PROTECTED]

Re: Strict vs Non-Strict

2001-02-24 Thread Ron Grabowski
Is it advantageous to use strict? What benefit does that offer over not using strict? Didn't we _just_ have this conversation? See the thread labeled 'use strict' which was last posted to less than 12hours ago. - Ron ___ Perl-Win32-Users mailing

Re: Extracting text from PDF files

2001-02-24 Thread Ron Grabowski
This is a pure Perl implimentation of pdf2txt: ftp://ftp.st.ryukoku.ac.jp/pub/doc-prep/acrobat/pdf2txt/pdf2txt_0.81 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: interpolating $obj-varname in strings

2001-02-22 Thread Ron Grabowski
print "Value of code is: $res-code\n"; you get: Value of rescode is: HTTP::Response=HASH(0x176517c)-code I can do print "Value of code is: " . $res-code . "\n"; Its more effecient to pass arguments to print() using commas: print 'Hello ', $res-code(), ' World'; Than trying to make

Re: PerlCheck Program

2001-02-19 Thread Ron Grabowski
Attached is a handy little program I wrote that will insure that all variables and subroutines that have been declared within a script are actually referenced by the script. It is handy for finding variables that have been defined but are never used within a script. What things does it catch

Re: SQL Question

2001-02-16 Thread Ron Grabowski
What is your Perl question? SELECT * FROM table where 'todays_date_from_script' = 'startdate' and "todays_date_from_script' = 'enddate' select * from table where '$todays_date_from_script' between '$startdate' and '$enddate'; might work but it sounds like you have a SQL problem.

Re: I need help, I am a newbie!

2001-02-14 Thread Ron Grabowski
I am trying to pull user input from my html page and I am getting no where. I installed and configured ActivePerl last week. Could something You need an HTML page to first call the script. form action="foo.pl" What is your first name: input type=text name=FirstName value="Ron"br input

my $NUMBER = 5; for local $NUMBER ( 0 .. 3 ) { print $NUMBER,\n }

2001-02-10 Thread Ron Grabowski
use strict; my $NUMBER = 5; for local $NUMBER ( 0 .. 3 ) { print $NUMBER, "\n"; } C:\tempperl -w foo2.pl Missing $ on loop variable at foo2.pl line 5. Could someone explain to me why this is the case? $NUMBER is declared elsewhere in my program as a lexical variable so I'd like to preserve

Re: URL encoding

2001-02-08 Thread Ron Grabowski
I am using lwp for POST and GET. When I send parameters, they are not being url-encoded. For example spaces are not being substituted with %20. I seem to recall HTTP::Request::Common supporting url-encodings: use HTTP::Request::Common; $ua = LWP::UserAgent-new; $ua-request(POST

Re: next unless

2001-02-06 Thread Ron Grabowski
while (ASN) { if (/^FILEHEADER/) { #ignore } elsif (/^DOC HEADER(\d+)/) { s/(DOC HEADER)(3 )/:ASNLNT: /; print; } elsif (/^HEADER/) { chomp; @fields = split(/~/, $_,); print join('~', @fields, "\n"); while (DATA) { chomp; my @fields = split /~/;

Re: next unless

2001-02-06 Thread Ron Grabowski
while (DATA) { Of course you'll have to change this... ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: mkdir Error question - Continued

2001-02-02 Thread Ron Grabowski
Insecure dependency in mkdir while running with -T switch at d:\internet\root\www\domain\cgi-bin\test.pl line 777. A search for "taint" on www.perl.com lead me to this: http://www.perl.com/pub/doc/manual/html/pod/perlsec.html which is also included with every installtion of Perl as

Re: Count the number of elements in an array

2001-02-02 Thread Ron Grabowski
@filelist=`dir c:\\tmp\\*.doc`; Remember that backticks return information as a scalar. So doing this @filelist = `dir /w c:\\`; would break your logic. I trying to get a count of files, with a certain pattern, from a directory. Philip's suggestion of using glob() grep() is the right way

Re: Parsing a logfile

2001-01-27 Thread Ron Grabowski
use strict; use Data::Dumper; my %hash; OUTSIDE: while ( DATA ) { if ( /^-/ ) { my($name) = $_ =~ /BEGIN (.+?) -/; while ( DATA ) { redo OUTSIDE if /^-/; next if $_ != /^some/; chomp $_, push @{$hash{$name}}, [ $_ ]; } } } print Dumper \%hash; __DATA__

Re: Blank ASP page

2001-01-26 Thread Ron Grabowski
gives no error, but no result either. http://velocity.activestate.com/docs/ActivePerl/CHANGES.html " works now with IIS5. Previously ASP would sometimes return an empty page when the page was accessed simultaneously from multiple clients. " It's the latest ActiveState install (618)

Re: Storing an OBJECT (like an SMTP object) in the Session or Application Object with ASP

2001-01-24 Thread Ron Grabowski
Not sure if this is the appropriate list or not, but I'd like to know if I can store an SMTP object (or a connection object, for example) in the Session or Application object via PERl in ASP. Any ideas? Storing an ADODB.Connection object in an an application variables is a BadThing. ADO

Re: Passing wildcards to perl

2001-01-22 Thread Ron Grabowski
for $filename (@ARGV) { foreach my $glob (@ARGV) { foreach my $filename ( glob $glob ) { # your code here } That should allow you do to perl style globs from the command line: *.fbi or single file names like foo.fbi For some reason I wasn't able to do $glob - Ron