RE: How to pattern match 'this but not that'

2004-03-17 Thread Peter Guzis
I think what you're looking for is a zero-width negative look-ahead assertion. ## if ($var =~ /this is (?!test|best|chest)/) {print "does not contain ## Peter Guzis Web Administrator, Sr. ENCAD, Inc. - A Kodak Company email: [EMAIL PROTECTED] www.encad.com -Original Message- From: Ig

How to pattern match 'this but not that'

2004-03-17 Thread Ignacz, Alex
Went through perlrequik and prelretut and faq and can't seem to find the answer to this question. Or maybe I'm just not thinking this thing out straight in the first place. How can I perform a pattern match where I want to match a part but not a subpart of a string. For instance, given $var = "

RE: Win32::NetResources Help - RESOLVED

2004-03-17 Thread Grakowsky, Richard \(ETS: Communications and Network Services\)
Here we go!   my($username,$pw,$mdriveshare,%mdriveinfo,$err);     $mdriveshare = "really\\long\\dfs\\path"; %mdriveinfo   = (     'RemoteName'   =>    $mdriveshare,     'LocalName'   =>    "M:", );  

Re: Help with recursive directory search

2004-03-17 Thread Dave Kazatsky
OK - that works for me too. I was using $File::Find::dir instead - $File::Find::name seems to be the difference. Thanks. Dave Kazatsky Senior Middleware Administrator W. (908) 575-6947 C. (973) 865-8106 "Morbus Iff" <[EMAIL PROTECTED]To:

Re: Help with recursive directory search

2004-03-17 Thread Morbus Iff
>What I need to do is look at a directory structure regardless of files. This works for me: #!/usr/bin/perl use warnings; use strict; use File::Find; find(\&dirscend, "C:\\"); sub dirscend { return unless -d $File::Find::name; print "$File::Find::name\n"; } If you need

Re: Help with recursive directory search

2004-03-17 Thread Dave Kazatsky
Maybe I'm missing something but this doesn't seem to be doing what I need. It appears that the directories are listed multiple times (once for every file in the directory) and a directory isn't listed at all if no files exist. What I need to do is look at a directory structure regardless of files

RE: Win32::NetResources Help

2004-03-17 Thread Guay Jean-Sébastien
Hello Richard, Please reply to the list... My suggestion didn't work, and knowing that maybe someone else can go a step further. If you only reply to me others might think my suggestion worked for you since they didn't see a reply from you. > Interesting thought, but I changed up the code and it

RE: Win32::NetResources Help

2004-03-17 Thread Guay Jean-Sébastien
Hello Joseph, > Everything else you said was spot on, Guay; but using { } creates an > *anonymous* hash (a reference). So now you have a single element hash > whose key is a hash ref and whose value is undef. > > Just use parentheses to make a hash, where keys alternate with their > values ("=>"

RE: Win32::NetResources Help

2004-03-17 Thread Joseph Discenza
Guay Jean-Sébastien wrote, on Wednesday, March 17, 2004 2:17 PM : > my($share) = some\\share\\path; : > my(%shareinfo) = { 'RemoteName' => $share }; : : I believe your mistake is here. Do not use parentheses after my, : except if : you want to assign individual elements of a list to

Re: Help with recursive directory search

2004-03-17 Thread Morbus Iff
>I am trying to setup a recursive read to capture every >directory and sub-directory but seem to be hitting a wall. Use File::Find. -- Morbus Iff ( i put the demon back in codemonkey ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASI

Help with recursive directory search

2004-03-17 Thread Dave Kazatsky
Hello Perlers, Need to write a script that compares directory structures (not files - directories only). I am trying to setup a recursive read to capture every directory and sub-directory but seem to be hitting a wall. Does anybody have any information I can use as starting point? This will run

RE: Win32::NetResources Help

2004-03-17 Thread Guay Jean-Sébastien
Hello Richard, > my($share) = some\\share\\path; > my(%shareinfo) = { 'RemoteName' => $share }; I believe your mistake is here. Do not use parentheses after my, except if you want to assign individual elements of a list to individual variables... Using parentheses tells my to create a l

RE: code to dermine RAM from registry key not working

2004-03-17 Thread Peter Guzis
Unfortunately, you are calculating the memory correctly. The registry really does contain that value. To work around this problem, try implementing a custom rounding subroutine for the memory size like so: ## use strict; my $original_memory = 127; my $rounded_memory = RoundMemory ($original

[Fwd: Out of Office AutoReply: Grep html]

2004-03-17 Thread Jeff Griffiths
not calling names here, but for all list members, please please configure your out of office autoreply when on vacation etc so that you don't spam people posting to the list. I don't want to unsub you, but I will if I get complaints. regards, JeffG __

Win32::NetResources Help

2004-03-17 Thread Grakowsky, Richard \(ETS: Communications and Network Services\)
Hello Guru’s,   Can anyone provide me a real world example of NetResources::AddConnection?  RTFM’ing isn’t helping me much today.   Here’s a snippet of what I’ve been swearing at…   my($share) = "some\\share\\path"; my(%shareinfo) = { ‘RemoteName' => $share }; Win32::NetResource

Re: Grep html

2004-03-17 Thread Jeff Griffiths
Hi Chris, You're looking for LWP: http://search.cpan.org/~gaas/libwww-perl-5.76/lib/LWP.pm basic code: use strict; use CGI; use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->agent('LWP-Spider'); my $url = 'http://www.activestate.com'; # default url ## check if there is a url as an argumen

Re: Grep html

2004-03-17 Thread $Bill Luebkert
Chris wrote: > Is there module for downloading html source from a website? I need to grep > the from a few thousand sites. I've googled and looked in cpan but > the there are sooo many modules that work with html/xml it's hard to find > what I need. LWP or LWP::Simple should handle it. check li

Grep html

2004-03-17 Thread Chris
Is there module for downloading html source from a website? I need to grep the from a few thousand sites. I've googled and looked in cpan but the there are sooo many modules that work with html/xml it's hard to find what I need. Regards, Chris ___ P

RE : code to dermine RAM from registry key not working

2004-03-17 Thread David Liouville
Without registry you could try : use Win32::API my %results; my $dwMSLength; my $GlobalMemoryStatus ||= new Win32::API("kernel32", "GlobalMemoryStatus", ["P"], "V") or return; my $MEMORYSTATUS = pack "L8",(0, 0, 0, 0, 0, 0, 0, 0); $GlobalMemoryStatus->Call($MEMORYSTATUS); ($dwMSLength, @results

code to dermine RAM from registry key not working

2004-03-17 Thread Matt Bazan
Hello, I've copied and slightly modified the code below to determine RAM on machines using registry keys from a posting I came across while googling. What's interesting is the code correctly returns the installed RAM about 75% of the time - the remaining 25% come back with a reading of 17

Win32::FileOp SaveAsDialog position.

2004-03-17 Thread Beckett Richard-qswi266
Hello world! Does anyone know how to position the Win32::FileOp SaveAsDialog window? At the moment it always seems to come up in the top left corner of the screen. Is it something to do with the -handle option, and am I doing that right if the main window is called $mw? I am invoking it like t

RE: disable cdrom and floppy

2004-03-17 Thread Thad Schultz
> -Original Message- > From: Peter Guzis [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 16, 2004 10:33 AM > To: Pesce, Nicholas (Novus Consulting Group); > [EMAIL PROTECTED] > Subject: RE: disable cdrom and floppy > > > use strict; > use Win32::API; > > my $drive_letter = 'Z:'; > > my

Win32::SerialPort: can not set baudrate

2004-03-17 Thread carlo filippini
Hi I am trying to control my mobile from my WinXP machine. The mobile is connected through USB which is mapped on COM 5. With Hyperterminal everything looks good. But when I try: --- use Win32::SerialPort qw( :STAT 0.19 ); $ob = ne

RE: perl executable

2004-03-17 Thread Anderson, Mark (Service Delivery)
Do a google for "Perl2EXE of PerlApp" Kind regards, Mark Anderson SMS Deployment The Royal Bank of Scotland 113 Dundas Street, Edinburgh, EH3 5DE http://www.manufacturing.rbs.co.uk/GTrswi/ > -Original Message- > From: Ken Cornetet [SMTP:[EMAIL PROTECTED] > Sent: Wednesday, March 17, 200

RE: perl executable

2004-03-17 Thread Ken Cornetet
You can run perl from another machine. Install Perl on one machine, and create a share to c:\perl (assuming that's where you install it). For example: install perl and any required modules on machine "foo". Share c:\perl as "perl". Then, on the client machine you can run \\foo\perl\bin\perl UncPa