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
>
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
> "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:
--
"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'));
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.
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
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
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
-
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
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
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
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
_
'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
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
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"
>
>
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",
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 =~ /
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
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
[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
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
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
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
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
24 matches
Mail list logo