RE: Scalar reference, pointer to pointer meaning

2002-12-28 Thread Gary Hawkins
= 99 See in-line. Gary Hawkins [EMAIL PROTECTED] wrote in message 01c2ae44$16e12c20$0201a8c0@garyha1">news:01c2ae44$16e12c20$0201a8c0@garyha1... I have a variable using module Win32::API that would be a pointer to a pointer in C. If I do: $var = $lplpBuffer;

Scalar reference, pointer to pointer meaning

2002-12-27 Thread Gary Hawkins
I have a variable using module Win32::API that would be a pointer to a pointer in C. If I do: $var = $lplpBuffer; print \$var $var\n; $var = \$lplpBuffer; print \$var $var\n; $var = \$lplpBuffer[0]; print \$var $var\n; ...it prints: $varÆ╢☺ $var

RE: File version info

2002-12-21 Thread Gary Hawkins
So why won't a multi-line match work with Unicode? This from perldoc perlunicode probably applies: WARNING: As of the 5.6.1 release, the implementation of Unicode support in Perl is incomplete, and continues to be highly experimental. Tried installing 5.8 but it did not go

File version info

2002-12-08 Thread Gary Hawkins
This is an effort to write filever.exe in Perl. Filever extracts file version information and is available in the later Windows resource kits I think, or maybe as early as NT4. In verbose mode it prints info like this: D:\filever.exe /v c:\windows\system32\kernel32.dll --a-- W32i DLL ENU

RE: File version info

2002-12-08 Thread Gary Hawkins
=~ /VS_VERSION_INFO.*StringFileInfo/ would return nothing to $. So why won't a multi-line match work with Unicode? -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 08, 2002 8:00 AM To: 'Gary Hawkins'; [EMAIL

XML

2002-05-12 Thread Gary Hawkins
http://www.xml.com/pub/a/2002/05/08/ws-easy.html It is supposed to be able to compare two XML files. Has anyone used it? Can you tell me how to install the module(s)? /g -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Unicode to ansi conversion (or normalization)

2002-05-12 Thread Gary Hawkins
I'm going to be working with XML files on Windows. Notice that in Notepad (on W2K+) you can save a file with different encodings, including Unicode. These XML files are Unicode. Opened directly in Notepad, they take on an appearance of having extra spaces between characters. Grep and diff

RE: Setting a Variable to String with \n? -- Perl 6

2002-04-25 Thread Gary Hawkins
This evidently is going to be addressed in Perl6 (with respect to here-docs). cf. http://dev.perl.org/perl6/apocalypse/2 Pretty entertaining stuff. Something uncanny about it. Cool to watch a programming language being designed or influence it. ... we won't make the mistake of

RE: Scope of variables. Lost in subs

2002-04-09 Thread Gary Hawkins
If you declare a variable with my() its scope will be from the declaration to the end of the enclosing block. Which for variables declared outside any {} block or eval means ... to the end of the file. Wrong. You forgot about 'package'. What do you mean: #!perl -w

RE: Scope of variables. Lost in subs

2002-04-09 Thread Gary Hawkins
How many things can packages be? Is this foo a file? No this foo doesn't have to be a file. You can have several packages in one file and switch between them. I don't know how to explain what ARE packages though. Try if perldoc perlmod makes sense to you. After reading perldoc

RE: Scope of variables. Lost in subs

2002-04-09 Thread Gary Hawkins
-Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 11:58 AM To: Gary Hawkins Cc: [EMAIL PROTECTED] Subject: RE: Scope of variables. Lost in subs Perhaps you're missing the point. Gee, maybe that was the reason for the question

RE: Find Files Based on Age

2002-03-28 Thread Gary Hawkins
From within perl: -Original Message- From: Scott Burks [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 11:56 AM To: [EMAIL PROTECTED] Subject: Find Files Based on Age This might be simple, but I haven't found a solution yet. I have a script that I use on our Unix

RE: Find Files Based on Age

2002-03-28 Thread Gary Hawkins
From within perl using built-in functions: $modification_time = (stat($file))[9]; # seconds since epoch $time = time; # now $age = $time - $modification_time; # age in seconds Gary -Original Message- From: Scott Burks [mailto:[EMAIL PROTECTED]] Sent:

Easy CMD window

2002-03-24 Thread Gary Hawkins
Is there a way to set up for starting a CMD window using a right click within that folder somehow, so the prompt is already in that folder? This routine of 'Start Run cmd' and then D: and cd foo etc can be a little monotonous. This is Windows 2000. Gary -- To unsubscribe, e-mail: [EMAIL

RE: A script to understand the output from a search engine HELP!!

2002-03-24 Thread Gary Hawkins
I have pulled the seach.html file as follows: I went to link http://srch.overture.com) then search for word help, then I save the result as file named search.html Then I wrote the script below to extract and find the URLs in this saved web page (which is not working very well). Part II I

RE: The LinkExtor.pm module

2002-03-24 Thread Gary Hawkins
Indeed I want to locate the LinkExtor.pm module. Cheers Bruce Assuming you have ActivePerl installed, try these two commands: D:\ppm search link Packages available from http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer: ASP-NextLink[0.11] Perl

FW: Easy CMD

2002-03-24 Thread Gary Hawkins
In a private correspondence someone wrote: The application is called FastCommandPrompt. At http://www.webattack.com, if you enter fast command, it is the first one which shows up on your screen. After installation, it is a right click and the option 'Launch Command Prompt' and you are

RE: Re[2]: param function

2002-03-17 Thread Gary Hawkins
print CGI::header(); print hello\n; print foo\n; print bar\n; foreach my $line (FILE) { my $result = do_something($line); } use LWP::Simple; my $credit_card_server = secure.mybank.com; my $username = my_secret_username; my $password = my_password; for $name

RE: param function

2002-03-16 Thread Gary Hawkins
Web form element names automatically become script variable names and are assigned their values... use CGI 'param'; for $name (param()) { $$name = param($name); } The double $$ is not a typo. Your question resulting in this solution has reduced the script I'm working on, by about 2000

RE: Save image to disk

2002-03-15 Thread Gary Hawkins
; print OUT $img; close OUT; print OK.\n; } else { print FAIL.\n; } Gary -Original Message- From: Gary Hawkins [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 6:10 PM To: [EMAIL PROTECTED] Subject: FW: Save

RE: Save image to disk

2002-03-14 Thread Gary Hawkins
Do have a Win32 version of wget working but not use a Perl module? It's like not breathing. You probably don't need a perl script for this, there's this command call wget in linux which you can use to mirror a site, and using the -A option you can make it download file with specified

FW: Save image to disk

2002-03-14 Thread Gary Hawkins
Worked fine on the remote system, but, can someone give me the ppm install ... url line to install LWP::Simple? -Original Message- From: Sent: Thursday, March 14, 2002 8:16 AM To: 'Gary Hawkins' Subject: RE: Save image to disk It looks like you didn't get a straight answer. You

Save image to disk

2002-03-13 Thread Gary Hawkins
Would like to save images to disk using their URL's. Hoping someone can give me a jump start on it. Gary -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Script line numbers during execution

2002-02-23 Thread Gary Hawkins
So __LINE__ is tricky eh? Wants to be an array? Tried tracking(__LINE__); and got only '1'. Resorted to: @line = __LINE__; tracking(@line); at the end of each line in the script ending with ';' or '}', and had to receive it in the sub like this: $line = $_[0]; The sub reads and writes

RE: Crop string to x characters

2002-02-17 Thread Gary Hawkins
How do I truncate a string to a particular number of characters? You can use the substr() function, or optimize your regex: #!/usr/bin/perl -w use strict; my $string; # with substr $string = hello word; $string = substr($string,0,4); print substr: $string\n; # with a regex

RE: select text

2002-02-05 Thread Gary Hawkins
-Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 9:25 AM To: 'Jonathan E. Paton'; [EMAIL PROTECTED] Subject: RE: select text Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a life

RE: perl2exe

2002-02-05 Thread Gary Hawkins
Perl Dev Kit's key new features include: PerlApp - turns your Perl programs into ready-to-run executables, which can now be built on Win 9x and HP-UX in addition to Linux and Solaris

RE: Perl and CGI

2002-02-05 Thread Gary Hawkins
He was asking, what's the difference if my file has a .pl extension or .cgi extension. Answer, no difference as far as Perl itself is concerned. It is the webserver settings that matter. To give you a couple of examples of where the difference is useful: My ISP requires CGI scripts (whether

RE: What's wrong with this?

2002-01-31 Thread Gary Hawkins
If you want to loop over all the form fields, you'd do: for $field (param()) { print $field = , param($field), br\n; } How can the param's be placed into a new hash? CGI.pm has a Vars() method, I believe, which returns a hash. use CGI; my $q = CGI-new; $data =

Moving CGI 'param' data into a writable hash [was:: What's wrong with this?]

2002-01-31 Thread Gary Hawkins
using the Perl4 cgi-lib.pl. However, I can think of no other legitimate use. Here's a nice, clean method of dealing with this: use strict; use CGI qw/:standard/; my %form_data = map { $_, get_data($_) } param; sub get_data { my $name = shift; my

RE: What's wrong with this?

2002-01-29 Thread Gary Hawkins
If you want to loop over all the form fields, you'd do: for $field (param()) { print $field = , param($field), br\n; } How can the param's be placed into a new hash? I'm working with a script that uses a lot of $data{'each_thing'} from %data. I tried replacing all instances with

SSL and HTTPS

2002-01-28 Thread Gary Hawkins
CommerceSQL uses Perl and needs https, secure server. I already asked this on their list with no reply. I don't know the first thing about secure servers. Can somebody point me in the general direction of how to set one up on NT4? Thx, /g -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: sending email - Mail::Sender and Mail::Sendmail

2002-01-25 Thread Gary Hawkins
http://search.cpan.org/doc/JENDA/Mail-Sender-0.7.10/Sender.pm.html and sending mail took a bit of code like this: Implied... use Mail::Sender; ref ($sender = new Mail::Sender({from = '[EMAIL PROTECTED]', smtp = 'company.com'})) or die $Mail::Sender::Error\n; (ref ($sender-MailMsg( {

RE: How do I check to see if a drive (i.e. C: or D:) exists??

2002-01-25 Thread Gary Hawkins
#!perl @driveletters = (C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z); for (@driveletters) { s#$#:\\#; print $_\n if ! -e; print $_ found\n if -e; } If you need to do different things based on different versions of Windows, one way to find the particular version is

RE: Computer connected to the internet?

2002-01-24 Thread Gary Hawkins
How can I check whether the system is connected? Want to pause the script if connection is lost. snip Instead of trying to check whether there is an Internet connection, just see whether you can do whatever it is your program is using the Internet for. snip Peter Scott [EMAIL

RE: Substitution formats

2002-01-20 Thread Gary Hawkins
I'm a big fan of s###. Easy for me to read. /g -Original Message- From: Troy May [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 19, 2002 11:45 PM To: Perl Beginners Subject: Substitution formats Hello, I only knew of one way to do them: s/// But japhy once answered

RE: Cgi on IIS

2002-01-19 Thread Gary Hawkins
Maybe the file name has a .cgi extension? .cgi is not set for exeeute by default. Try renaming it .pl assuming you installed ActivePerl. Or in Internet Services Manager right click the scripts folder, and take a look at the instructions in the attached mail of few days ago. I'm figuring

RE: sample customer dbms in perl/mysql

2002-01-19 Thread Gary Hawkins
http://www.commercesql.com/ is one. If on Winders you'll have some surgery to do, like adding a new spleen to their code, the sendmail module. Since you have that deadline, recommend *nix. /g Federal Reserve needs a free package? Whew! That's some recession. -Original Message-

RE: Cgi on IIS

2002-01-19 Thread Gary Hawkins
1. A Virtual Directory called cgi-bin within your web site. That was great. Just a couple points, the directory can be called cgi-bin but doesn't need to be. I made the same changes to one called 'store' tonight on NT4 and it works. Secondly for security reasons I've heard it generally

RE: Cgi on IIS

2002-01-18 Thread Gary Hawkins
Maybe the file name has a .cgi extension? .cgi is not set for exeeute by default. Try renaming it .pl assuming you installed ActivePerl. Or in Internet Services Manager right click the scripts folder, and take a look at the instructions in the attached mail of few days ago. I'm figuring

Perl debugger window

2002-01-17 Thread Gary Hawkins
I mentioned the perl debugger before but I guess some people would not have had the GUI version available. It comes with the Perl Development Kit, so I should clarify. Don't know about *n*x but if you installed ActivePerl on Windows, then install the Perl Development Kit and try: perl -d

RE: Create a file in CGI!??!

2002-01-17 Thread Gary Hawkins
Uh-huh, ok. Here are the results of your query. Your search found 824,000 results: http://www.google.com/search?num=100hl=enq=How+to+create+a+file+in+cgi Pretty broad topic. -Original Message- From: Dragos Dorin [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 7:37 PM

File::Find

2002-01-16 Thread Gary Hawkins
Here's a fairly simple little script to list directories and files recursively. Couple questions: -- Is it fairly simple to make it list everything in a properly indented heirarchy? (Somewhat similar to what windows explorer would look like if every level were expanded). -- In the sub, how can

RE: subroutine returning lines of text

2002-01-16 Thread Gary Hawkins
im wondering how i can make a subroutine that will return all text lines between certain marks such as START and STOP: text file: START text is here and there is a lot of it STOP so i would like to call the subroutine with the arguments START and STOP (because i may need more

RE: File::Find

2002-01-16 Thread Gary Hawkins
Read through 'preprocess' subsection of the File::Find docs (perldoc File::Find). This might be of help to you. I already read the fantastic manual and was hoping for something that conveys understanding. preprocess The value should be a code reference. This code reference

RE: read source file of .html

2002-01-15 Thread Gary Hawkins
That works. It became tweaked a little, $page = shift to be able to alter the result, and a '/' b/c a top-level URL without file name and without trailing forward slash gets redirected on the server to the version with the trailing forward slash. A little quicker. In detail, I think that

RE: extracting links from HTML data (7my own problem usiing grep

2002-01-15 Thread Gary Hawkins
However the script continues print @list3; my $var1='META'; @lista= grep{$var1} @list3;## not picked up at all print @lista anyone any clues Suppose I'm a little confused but perhaps you meant: print @list3; @lista= grep(/META/, @list3); print @lista; /g -- To unsubscribe, e-mail:

RE: rand() function

2002-01-14 Thread Gary Hawkins
with @data = sort @data: http://www.eskimo.com/~ghawk/temp/randplotsorted.png Gary -Original Message- From: Wagner-David [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 9:20 PM To: 'Roger C Haslock'; Gary Hawkins Cc: [EMAIL PROTECTED] Subject: RE: rand() function

Dependencies script

2002-01-14 Thread Gary Hawkins
Is there a script that can trace dependencies? Something like: trace.pl myscript.pl myscript.pl: 'use LWP' found /usr/local/lib/perl5/LWP myscript.pl: $ua = new LWP::UserAgent found /usr/local/lib/perl5/LWP/UserAgent.pm UserAgent.pm: 'require LWP::MemberMixin'

RE: Dependencies script

2002-01-14 Thread Gary Hawkins
In private correspondence, the esteemed bcc'd entity penned: hi again. i work with perl, but I dont know,for what purpose you want to do that ? for which puepose? If you are on Windows, check out http://www.dependencywalker.com/, and open an exe or dll in it. That provides a tree view of

RE: Dependencies script

2002-01-14 Thread Gary Hawkins
Or you can install the Devel::Modlist module, and just type: perl -d:Modlist myscript.pl And have all the use'd and require'd modules and files needed by the script printed. http://search.cpan.org/search?dist=Devel-Modlist Thank you. Sounds evil but it works. Copy to existing

RE: 2 Questions

2002-01-14 Thread Gary Hawkins
1) Double clicking my Perl file within Windows Explorer opens within the DOS window, but then closes immediately after execution. It flashes up on the screen and closes itself. Can I prevent this auto termination? `pause`; or: system pause; Although pause is not documented in either cmd

RE: read source file of .html

2002-01-14 Thread Gary Hawkins
use LWP. it can be as simple as this : use LWP::Simple; print get(http://www.mit.edu;); Tor. Neat. Along that line, I would like to be able to wind up with pages after retrieval as plain text without html tags, hopefully using a module. /g -- To unsubscribe, e-mail: [EMAIL

RE: Line Numbers and...

2002-01-12 Thread Gary Hawkins
Seems a good example of how every little question has some merit. You just never know. I've had the same problem on Windows 2000 and have been using edit.com to find line numbers in my scripts, and it isn't real handy; it opens a small window, navigation is slow, etc. There is probably a

RE: How do I delete a file from Perl?

2002-01-12 Thread Gary Hawkins
system(rm -rf $file); But if you copied this from another source, that source was totally unaware that deletion of files like THAT is TOTALLY unsafe. A safer approach is: system(rm, -rf, $file); I'm not aware of the reason for it. What's a good way to find which perl doc contains

RE: Another simple program which doesnt work.

2002-01-12 Thread Gary Hawkins
This newsgroup is great. I am learning alot from just reading the post here. I hope someone will be able to help with this query. Me too. But I learned a new word yesterday, pedantic. Just wanted to try it out, here goes. : Listserves: Email lists are read in an email program or on the

Add locations to ppm

2002-01-10 Thread Gary Hawkins
Example: http://www.roth.net/perl/packages/ has some packages. How can I permanently add such a location so ppm will include it in searches. Mainly want to install win32-registry used by GetIP.pl. /g -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: pull line #1 from a file

2002-01-09 Thread Gary Hawkins
If the original line is testing\n, the new line will be tested\n\n. No, If the original line is testing\n, the new line will be tested. If the original line is testing, the new line will be tested. on my machine. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: rand() function

2002-01-09 Thread Gary Hawkins
to take successive pairs, and plot them on a graph. Bad generators would show distinct lines after a while. eg for (0..1) { plot rand(), read() } What would it require to make that do something? ppm search plot Packages available from

RE: pull line #1 from a file

2002-01-08 Thread Gary Hawkins
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: Re: pull line #1 from a file Ronald Yacketta wrote: Can someone help me fix this? I know I am on the right track (I hope) but not sure

RE: email word attachment from html form input

2002-01-08 Thread Gary Hawkins
Recommend replacing the parsing routine, mainly because it is said to have a bunch of security holes: read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs=split(//, $buffer); foreach $pair (@pairs) { ($name, $value)=split(/=/,$pair);

RE: hiding file data

2002-01-08 Thread Gary Hawkins
Stuart I have a few perl files that I need to send out to a Stuart client. However, we do not want them seeing what are in the Stuart files for obvious reason. What obvious reason? That would be so the client doesn't walk away from the guys who do the work once they have the goods. Stuart

RE: rand() function

2002-01-07 Thread Gary Hawkins
Is there a statistically better solution for generating random numbers than Perl's built in rand() function? I noticed a couple modules on CSPAN, but are they any better? I haven't done a true test of the spread regular rand() gives, but it seems to me to give numbers closer to the top

RE: who is the method cop?

2002-01-07 Thread Gary Hawkins
Unbelievably, I'm actually walking around not fully understanding one or more of these: Blessed variables Class methods Class variables Classes Fubars Functions Global variables Instance methods Methods Objects Package variables Packages Properties Subroutines Zebras Is there a simple yet

RegEx speed (was: Using regexp to get a substring)

2002-01-06 Thread Gary Hawkins
That'll work, but on a finer point, if you need to be thinking about optimization at the moment: ($substring1 = $string) =~ s/.*\\(.*)/$1/; is about 4 times slower than: ($substring2 = $string) =~ s/.*\\//; because the second one doesn't have to store the matched value inside the

Computer connected to the internet?

2002-01-04 Thread Gary Hawkins
How can I check whether the system is connected? Want to pause the script if connection is lost. /g -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Computer connected to the internet?

2002-01-04 Thread Gary Hawkins
that, but if the ping to the router fails, then you are definetly without connection) then you could assume you've lost connection. John -Original Message- From: Gary Hawkins [mailto:[EMAIL PROTECTED]] Sent: 04 January 2002 12:24 To: [EMAIL PROTECTED] Subject: Computer connected

RE: Computer connected to the internet?

2002-01-04 Thread Gary Hawkins
GH How can I check whether the system is connected? your OS? and your connection type? Well, everything in the world preferably (I'm only asking for the world), if others are going to be able to run it, but W2K and DSL for humble starters. Maybe check whether a particular port is open? Thx

RE: Detect redirected URL as originally 404

2002-01-03 Thread Gary Hawkins
things are beginning to sink into my thick skull. And to think, wasn't that long ago I was wondering what $a =~ s/this/that/ was all about. /g -Original Message- From: Gary Hawkins [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 30, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: Detect

Print / overwrite line

2002-01-03 Thread Gary Hawkins
How can I clear a line before replacing it? Am doing \r and overwriting, but sometimes the text that was there previously is longer than the new text. gary -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Rex Swain's HTTP Viewer

2001-12-31 Thread Gary Hawkins
Cool... http://www.rexswain.com/httpview.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Detect redirected URL as originally 404

2001-12-30 Thread Gary Hawkins
I want to scan a list of URL's for bad ones. The following is largely from 'perldoc lwp'. The particular bad URL is being redirected to a custom 404 page, so it returns 200 instead. Is there some way to know if the request has been redirected? If so, is there a way to know *why* it was

RE: Good CS Literature

2001-12-29 Thread Gary Hawkins
Question strikes me as a great idea Jeff. Well I'm still afflicted by the awful leperous backtick habit so this might not be right but it was fast, and the result sure looks like a duck. Cheers, /g #!perl.exe -w # Collect perldoc results into a single file. # Keys in on '^=' to determine if

RE: Calling a shell from a perl script.

2001-12-23 Thread Gary Hawkins
With tcsh I just use backticks (below the tilde) because it's simple and reliable and no worry about resources and they are not repetitive tasks and I don't care if Santa brings me anything. So: `cp thisfile thatfile`; bing, done. Cron for example, a scheduled task, can start the script

PerlMx

2001-12-22 Thread Gary Hawkins
Anyone using this? http://aspn.activestate.com/ASPN/Reference/Products/PerlMx/FAQ.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Taking Backup of some files in a directory structure

2001-12-21 Thread Gary Hawkins
Looks like you are running Windows based on Outlook in header. So something like this ought to do it: BASIC #!perl.exe -w @files = `dir /s /b C:\\*.expect`; chomp @files; for (@files) { s#\\##g; $newfile = $_ . .bak; `move \$_\

RE: split

2001-12-21 Thread Gary Hawkins
PROBLEM - unresolved error messages... $line= 1,6.944,methane,29.6576,70617.28,*BB,8533.32,2381.0883,0.21 I use split (/,/,$line) to send each of the nine elements to an array. Try quotes enclosing the entire string and a semicolon at the end of the line, and 'use diagnostics -verbose;'.

Perl in VB

2001-12-21 Thread Gary Hawkins
I know Perl is used in C and C++ but is there a way to do the same in Visual Basic? /g -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: split

2001-12-21 Thread Gary Hawkins
my $line=qw(1,6.944,methane,29.6576,70617.28,*BB,8533.32,2381.0883,0.21); Bonk. When using qw (quote words) I thought they had to be separated by white space: $line=qw(1 6.944 methane 29.6576 70617.28 *BB 8533.32 2381.0883 0.21); which brings up a question, what if one of the elements

RE: Default variable for STDIN.

2001-12-20 Thread Gary Hawkins
Rather, use: if ($input =~ /^y$/i) unless you want yellow and okay to work too. -Original Message- From: Agustin Rivera [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 5:16 PM To: Daniel Falkenberg; [EMAIL PROTECTED] Subject: Re: Default variable for

RE: trouble with curly brackets

2001-12-19 Thread Gary Hawkins
That being said, you should never, never try to parse CGI form data by hand. What do you use John. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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

2001-12-17 Thread Gary Hawkins
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 when I run the script the array

RE: Perl and tk, where and what?

2001-12-12 Thread Gary Hawkins
When that's done, type 'pktsh' at the command-line, and you get a little interactive shell to play with stuff. That's 'ptksh', rather. Type 'widget' for cool demos. Text Hypertext 4. Arrows' for example. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: Outputting shell command to a browser

2001-11-02 Thread Gary Hawkins
The overall problem is not if grep works or not, but why the output from the backticks does not show up in the cgi. I only put the grep in there to make the code read easier. $results does not have anything in the cgi with or without the grep. Below is the code again. Am I not

RE: Outputting shell command to a browser

2001-11-01 Thread Gary Hawkins
Pipe not working with /usr/bin/grep. Why is that? Notice... print `/usr/bin/dig -x $ip | grep PTR`; works, but: print `/usr/bin/dig -x $ip | /usr/bin/grep PTR`; does not. Another alternative: $results = join(, grep(/PTR/, `/usr/bin/dig -x $ip`)); /g

RE: Outputting shell command to a browser

2001-11-01 Thread Gary Hawkins
print `/usr/bin/dig -x $ip | /usr/bin/grep PTR`; does not. Works fine on my system, as it should. Are you sure your grep is in /usr/bin? whereis grep grep: /usr/5bin/grep /usr/bin/grep /usr/man/man1/grep.1v /usr/5bin/grep also does not work. g -- To unsubscribe, e-mail:

RE: Calling external executable with parameter under WinNT.

2001-10-30 Thread Gary Hawkins
#!perl.exe $name=C:\\perl test\\perl text.txt; `$name`; runs Notepad with the txt file under Windows 2000. The double quotes in `$name`; are needed for cmd.exe due to the spaces. /g -Original Message- From: Rubiniec, Krzysztof [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October

RE: execuating fast...

2001-10-29 Thread Gary Hawkins
o The Camel Book Programming Perl (3rd Edition) by O'Reilly Associates has a section in the back about making Perl code faster, as far as I remember Second edition: http://www.bluesreview.com/Oreilly/perl/prog/index.htm 8.3 Efficiency

RE: off topic - javascript question

2001-10-29 Thread Gary Hawkins
When we're done with the terrorists I suggest we go after these people cheating their unwelcome ads onto our systems and stealing our time for their selfish purposes. -Original Message- From: Luinrandir Hernson [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 28, 2001 8:53 AM To: