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() wor

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 re

Re: perl module for 'clicking' links??

2002-09-04 Thread Ron Grabowski
T&C 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 " href=r/fo>Photos" on yahoo's index page. I would like a script that > would emulate that click and load the resulting page into the web brows

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: 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 ins

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"; > > $u

Re: trying to understand how regex works

2002-08-12 Thread Ron Grabowski
> open FOUT, ">>/some/path/outputfile.txt"; > open FILE ">/some/path/outputfile.txt") or die("Error: $!"); open(FILE " while{ > p="N"; > next if (/.*?\|value_garbage1\|.*?/ || > /.*?\|value_garbage2\|.*?/ || > /.*?\|value_garbage3\|.*?/); my $regex = join '|', 'value_garbage1',

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: 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
> 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 ma

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: http://listserv.Act

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); wh

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 b

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: 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: http://listserv.ActiveState

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

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

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 the

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=module&query=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: 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 = > 'TestTest'; > # N

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 r

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}$/)); --- {\f2

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: 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 loo

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 happen

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: 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 appl

Re: scalar context question

2001-07-03 Thread Ron Grabowski
> > I don't think it would force a scalar context. => is just a shorthand for comma in a list. In other words, $b in the following three code segments would get the same results: A comma that adds single quotes the value to its left. ___ Perl-Win32-Us

Re: Regular expression

2001-07-03 Thread Ron Grabowski
> print "$1 \n" if $text =~ /\/(.+):/; > print "$1 \n" if $text =~ /\/([^\/]+):/; Or you could do it in one line: (split/:\s/)[2] =~ m|.*/(.*)$|; ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/

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 s

Re: MSComm and Win32::API

2001-06-30 Thread Ron Grabowski
> serial port communications? Why not use this instead: http://search.cpan.org/search?dist=Win32-SerialPort ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

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 "usag

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 a

Re: Smartarse Unix Beardy Types...

2001-06-22 Thread Ron Grabowski
> perl -e "while (1){rand>0.5 ? print'\\' : print'/'}" perl -e "print rand > 0.5 ? q/\\/ : q\/\ while 1" ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Re: Question

2001-06-20 Thread Ron Grabowski
Title: Network Blitz HTML mail ==> *yuck*   Did you download and install the LDAP.pm module on your computer?     Can't locate Net/LDAP.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at PerlLDAPquery.plx line 4.BEGIN failed--compilation aborted at Pe

Re: 'Reversing an array'

2001-06-11 Thread Ron Grabowski
> I have an array with value of 1-10. > > What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6 ...) @array = reverse(@array); perldoc -f reverse http://www.google.com/search?q=how+do+i+reverse+an+array+in+perl ___ Perl-Win32-Users

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: 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 PO

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

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 l

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

Re: Getting text from HTML pages

2001-06-08 Thread Ron Grabowski
> my ($text)=$htmlstring=~/\(.*)/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

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: 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("" . Dumper( $dGateway

Re: Reading a file from point A to B

2001-04-16 Thread Ron Grabowski
> my( $var ); > while( <> ) { > $var = $_ if ( m!! .. m!! ) == 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 between BEGIN and E

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 datacheck

Re: net::telnet

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

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: 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 argu

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: 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; $i<

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 t

Re: Question about displaying records from last to first

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

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). http://www.w3.org/People/Raggett

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: 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: 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

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: [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] http://listserv.ActiveSta

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... ___ Perl-Wi

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 af

Re: bad logic

2001-03-08 Thread Ron Grabowski
> sub Get_Input { > print "\nEnter Job Type ['L' to list]: "; > chomp($type=); > 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: 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: 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 > va

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: 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 do

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: 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 = ("2","27","0","0","2","","0","0

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: CGI Timeout after 5 mins. Sound familiar to anyone?

2001-03-03 Thread Ron Grabowski
> CGI Application Timeout > CGI TimeoutThe 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 15minutes. Are you sure you

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. ___ Perl-Win32-

Re: Where's the faq ?

2001-03-02 Thread Ron Grabowski
> there is a link "perlscript examples" in the menu on the left but there FYI, PerlScript is also a scripting client under Microsoft Scripting Host. With coupled with IIS ( MS's web server ) and ASP ( Active Server Pages ) you can embed Perl along side VBScript, Javascript, etc. PerlScript also a

Re: Regular Expression question

2001-03-02 Thread Ron Grabowski
> This works great, but now I need to add an (AND, OR) search ability to my > search. $query->{Find} =~ /^(.+?)\s+(and|or)\s+(.+?)$/i; $sql = "SELECT bla, bla FROM table WHERE column LIKE '$1' $2 '$3'" Of course you'll have to tweak that so a user doesn't enter something like and foo foo and

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 ( ) { /(\d\d\d\d)/ && push @{$jobs{$1}}, $1; } print Dumper \%jobs; __DATA__ |- |JT# | || |1780| |1776| |1781| |1778| |1785| |1787| |1788| |178

Re: Convert file last modified date

2001-03-02 Thread Ron Grabowski
> When you right click on a file in windows you get various information about > the file, including modified date. I want to able to extract that same date > using Perl. I'd be curious to know if its possible ( with API calls perhaps ) to access that information. I know someone was asking about i

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

2001-03-02 Thread Ron Grabowski
> To extract just the text of an HTML file I use HTML::TokeParser and > the get_trimmed_text("") method call. That takes care of all > the HTML tags in one fell swoop. It will leave strings like [IMG] where > an image tag was but '$text=~s/\s*\[IMG\]\s*/ /g;' takes care of those. I think the OP w

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

2001-03-02 Thread Ron Grabowski
> $string =~ s/.*<[\s]*script.*>.*<[\s]*\/script>//ie; Are you sure that regexp is correct? $string = <<''; var foo = new Array(); Hello World var bar = new Array(); $string2 = <<''; var foo = new Array(); Hello World $string =~ s/.*<[\s]*script.*>.*<[\s]*\/script>//ies; $string2 =~

Re: running another script under win98

2001-03-01 Thread Ron Grabowski
> complicated for what I require as no variables are passed just a file read require 'common_code.pl'; where common_code.pl might look like: open FOO, 'foo.txt' or die "foo: $!"; # stuff close FOO; 1; # remember this ___ Perl-Win32-Users mailing

Re: modifying windows "*.lnk" shortcut files from perl (even under unix) ?

2001-03-01 Thread Ron Grabowski
> I know there is a win32-shortcut module. But I can't "use > Win32::Shortcut" from the linux based perl it doesn't want to load > under linux perl. Has anybody worked out how it might be used > on a linux server to modify windows 9x style shortcut files using > the windows version of perl? If yo

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 ). http://www.google.com/search

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 arra

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); ___ Perl-Wi

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: 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: 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 l

perl-win32-users@listserv.activestate.com

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

perl-win32-users@listserv.activestate.com

2001-02-24 Thread Ron Grabowski
> You have escaped the & sign in your call to the wanted subroutine. You > need to remove the backslash in front of the &wanted statement. Are you sure about that? SYNOPSIS use File::Find; find(\&wanted, '/foo','/bar'); sub wanted { ... } use File::Find;

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 qw($gl

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

Re: Using Telnet on Window NT

2001-02-22 Thread Ron Grabowski
> Can any one has small test script to use telnet on window NT box that I can use > to understand how the login process works. As Windows is a GUI operating system, you cannot telnet into it unless the machine is running some sort of telnet server. If it is running a telnet server, the login is s

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 ca

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. What is your first name: That should make the script work. When you hit the submit button, the

Re: Win32::Process and Win32::GuiTest

2001-02-14 Thread Ron Grabowski
> Unfortunately, this app doesn't use automated OLE. And it acts on the input > file, so I can't just paste the input file to the clipboard. http://search.cpan.org/doc/GSAR/libwin32-0.16/Clipboard/Clipboard.pm might be able to. ___ Perl-Win32-Users m

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:\temp>perl -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: dereferencing an array

2001-02-08 Thread Ron Grabowski
> The code I am trying is something like this: > > @itemarray=@{$data->$item}; > > foreach $DataItem(@itemarray) > > { > print $DataItem . "\n"; > > } > > Unfortunately this is not work.. I think it has something to do with scalars What do you mean by not working? Are you getting wro

  1   2   >