Re: PGPLOT on Win32

2004-10-15 Thread Randy Kobes
On Sat, 16 Oct 2004, Sisyphus wrote: > Hi, > > Prompted mainly by a question on this list a week or 2 ago (and partly > by my own curiosity) I've just built PGPLOT-2.18 on windows, perl 5.8 > but there's a slight hitch. > > Firstly, as I didn't relish trying to build the pgplot C/Fortran library >

PGPLOT on Win32

2004-10-15 Thread Sisyphus
Hi, Prompted mainly by a question on this list a week or 2 ago (and partly by my own curiosity) I've just built PGPLOT-2.18 on windows, perl 5.8 but there's a slight hitch. Firstly, as I didn't relish trying to build the pgplot C/Fortran library from source, I grabbed the one at http://jrfonse

RE: simple regex question

2004-10-15 Thread Gerber, Christopher J
> "bruce" <[EMAIL PROTECTED]> > > $foo = "foo.txt" > > > > i simply want to separate on the "." > > Try: > > use File::Basename; > # > my $foo = "foo.txt"; > my $ans = fileparse($foo, ('.txt')); > print "$ans\n"; > If you REALLY want to use the regex, you could try one of the following: --

Re: simple regex question

2004-10-15 Thread Martin Leese
"bruce" <[EMAIL PROTECTED]> hi.. a simple/basic/embarassingly simple one... i have: $foo = "foo.txt" i simply want to separate on the "." ie $foo =~ /([^.]+).txt/ $ans = $1 this doesn't seem to get $ans = 'foo' Try: use File::Basename; # my $foo = "foo.txt"; my $ans = fileparse($foo, ('.txt'));

Re: how to have a perl script delete itself...

2004-10-15 Thread Rhesa Rozendaal
Tom Pollard wrote: On Fri, 15 Oct 2004, Rhesa Rozendaal wrote: Tom Pollard wrote: On Fri, 15 Oct 2004, Rhesa Rozendaal wrote: What makes you think I didn't test it? My apologies for the implied slight. No problem. And what makes you think the script is in use? A perl script is not an executable.

Re: how to have a perl script delete itself...

2004-10-15 Thread Tom Pollard
On Fri, 15 Oct 2004, Rhesa Rozendaal wrote: > Tom Pollard wrote: > > On Fri, 15 Oct 2004, Rhesa Rozendaal wrote: > > > >>unlink $0 or die "Error during self-destruct: $!"; > > > > I'd be surprised if that worked under Windows. Unlike Unix, I didn't > > think Windows allowed you to delete a

Re: how to have a perl script delete itself...

2004-10-15 Thread Rhesa Rozendaal
Tom Pollard wrote: On Fri, 15 Oct 2004, Rhesa Rozendaal wrote: unlink $0 or die "Error during self-destruct: $!"; I'd be surprised if that worked under Windows. Unlike Unix, I didn't think Windows allowed you to delete a file that was in use. What makes you think I didn't test it? And what make

Re: how to have a perl script delete itself...

2004-10-15 Thread Tom Pollard
On Fri, 15 Oct 2004, Rhesa Rozendaal wrote: > unlink $0 or die "Error during self-destruct: $!"; I'd be surprised if that worked under Windows. Unlike Unix, I didn't think Windows allowed you to delete a file that was in use. TomP -

Re: how to have a perl script delete itself...

2004-10-15 Thread Rhesa Rozendaal
bruce wrote: hi.. does anyone have a suggestion/comment/thought as to how i can have a perl script delete/remove itself once it finishes running...??? unlink $0 or die "Error during self-destruct: $!"; :-) ___ Perl-Win32-Users mailing list [EMAIL PROT

RE: how to have a perl script delete itself...

2004-10-15 Thread Schneider, Kenneth (EKT)
how 'bout making the last line of your perl script: exec("del /F /Q myscript.pl"); --ken -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 1:04 PM To: [EMAIL PROTECTED] Subject: how to have a perl script delete itself... hi.. does anyone have a su

RE: simple regex question

2004-10-15 Thread Andy_Bach
A further debug/syntax nitpick: print "foo='$foo'\n"; $foo =~ /([^.]+).txt/; $ans = $1; print "ans='$ans'\n"; best as: my ($foo, $ans); print "foo='$foo'\n"; if ( $foo =~ /([^.]+)\.txt/ ) { $ans = $1; } else { $ans="match failed on: $foo"; } print "ans='$ans'\n"; if you ch

how to have a perl script delete itself...

2004-10-15 Thread bruce
hi.. does anyone have a suggestion/comment/thought as to how i can have a perl script delete/remove itself once it finishes running...??? ie: perl stuff . . . ok, i'm done.. kill/remove myself from the dir/folder... thanks bruce _

RE: simple regex question

2004-10-15 Thread bruce
'ppreciate the responses!! it was a typo! f^*&ng fingers!! -bruce -Original Message- From: Gardner, Sam [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 10:54 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: simple regex question Well, just as a basic note, you are a

RE: simple regex question

2004-10-15 Thread Joseph Discenza
bruce wrote, on Friday, October 15, 2004 1:39 PM : a simple/basic/embarassingly simple one... : : i have: : : $foo = "foo.txt" : : i simply want to separate on the "." : : ie : $foo =~ /([^.]+).txt/ : $ans = $1 : : this doesn't seem to get $ans = 'foo' Maybe you're going for s

Re: simple regex question

2004-10-15 Thread O'K Web Design
Hi Bruce I would use split(/\./,$foo) Mike - Original Message - From: "bruce" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: October 15, 2004 1:38 PM Subject: simple regex question > hi.. > > a simple/basic/embarassingly simple one... > > i have: > > $foo = "foo.txt" > >

RE: simple regex question

2004-10-15 Thread Gardner, Sam
Title: RE: simple regex question Well, just as a basic note, you are aware that the "." in regexes matches ANY character (except a newline, in most situations), right?  But also, you seem to have put ^. Inside a character class, so it won't be "beginning of the string, and then any character",

Re: simple regex question

2004-10-15 Thread Kester Allen
Hi Bruce-- You're getting confused by the multiple regexp uses of ".". When it is in a character class or escaped: "[.]" or "\.", it means a literal period, when it's unescaped: "." it means "any character." You've got them backwards in your regexp. Try: perl -le '$foo = qq/foo.txt/; $foo =~ /

RE: simple regex question

2004-10-15 Thread Arms, Mike
Works for me. Might I suggest adding simple debugging print statements before and after your match: print "foo='$foo'\n"; $foo =~ /([^.]+).txt/; $ans = $1; print "ans='$ans'\n"; Maybe $foo doesn't contain what you think it does. Also, a nitpick, but you did not include the semicolons whi

simple regex question

2004-10-15 Thread bruce
hi.. a simple/basic/embarassingly simple one... i have: $foo = "foo.txt" i simply want to separate on the "." ie $foo =~ /([^.]+).txt/ $ans = $1 this doesn't seem to get $ans = 'foo' any ideas as to what i've screwed up... thanks bruce ___ Pe

Re: Need help on usage of "Net::FTP" in Windows 2000 Server

2004-10-15 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > This maybe a hint. > > C:\>perl -MCwd -le "print cwd(); system('cd aa'); print cwd();" > C:/ > C:/ > > C:\>perl -MCwd -le "print cwd(); chdir('aa'); print cwd();" > C:/ > C:/aa Some people don't get hints. > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

Multiple Channels are getting created using Net::SSH::Perl - SSH2 protocol

2004-10-15 Thread JAGADISH, ARCHANA (STSD)
Hi All, I am using Net::SSH::Perl with protocol set to SSH2 I don't know why, multiple channels are getting created. I have 3 commands $ssh->cmd("CL"); $ssh->cmd("0"); $ssh->cmd("Q"); The session is not maintained. This is the output. Please help me. Thanks, Archana fennel: Entering interactiv

RE: Need help on usage of "Net::FTP" in Windows 2000 Server

2004-10-15 Thread h-taguchi
This maybe a hint. (B (BC:\>perl -MCwd -le "print cwd(); system('cd aa'); print cwd();" (BC:/ (BC:/ (B (BC:\>perl -MCwd -le "print cwd(); chdir('aa'); print cwd();" (BC:/ (BC:/aa (B (BRegards, (BHirosi Taguti (B[EMAIL PROTECTED] (B (B (B (B (B (B

Need help on usage of "Net::FTP" in Windows 2000 Server

2004-10-15 Thread Uma Chandrsekaran
Hello I need help in FTP a file to a local directory. But it is not working. $path_1 = "C:\uma"; system (cd "$path_1"); $path = "/home/uma"; print "Download initiated ...\n"; my $ftp = Net::FTP->new($hostname); $ftp->login($username, $password) or warn "Can't log test $username\n"; $ftp->c

Need information on Net::SSH::W32Perl package

2004-10-15 Thread Rishi Kaundinya M
Title: Need information on Net::SSH::W32Perl package Hi All, I am using the above package for my project work and stucked at the following Point. eb96140: Warning: ignore packet type 100  > Program is hanging here eb96140: Reading configuration data /.ssh/config eb96140: Reading