On 3/7/06, Gavin Bowlby <[EMAIL PROTECTED]> wrote:
> So
>
> (\.)?
>
> differs from
>
> (\.?)
>
> in that there is no match in the first case, but there is a match in the
> second case?
Well, to be sure, we're talking about a successful pattern match in
either case. But the first one has a quantifi
Gavin Bowlby wrote:
So
(\.)?
differs from
(\.?)
in that there is no match in the first case, but there is a match in the
second case?
I'm still confused as to why the placement of the ? operator inside or
outside the parentheses makes a difference.
I thought the parentheses were only there
So
(\.)?
differs from
(\.?)
in that there is no match in the first case, but there is a match in the
second case?
I'm still confused as to why the placement of the ? operator inside or
outside the parentheses makes a difference.
I thought the parentheses were only there to bind the result to
On 3/7/06, Gavin Bowlby <[EMAIL PROTECTED]> wrote:
> Could someone explain why the first case fails?
It's not failing. It's warning.
It's warning you that you're using an undefined value as if it were a
string. That's odd, Perl is saying, you seem to have expected $3 to
hold a string. But since
#!/usr/bin/perl
use warnings;
use strict;
my ($x, $y);
$x = "57 s";
# the following statements fail:
$x =~ /^(\s*)(\d+)(\.)?(\d*)(\s*)(s|S)/;
$y = $1.$2.$3;
# FAILS with "Use of uninitialized value in concatenation (.) or string"
# because $3 is undefined
# whereas these statements pass:
$x =~
Hans Meier (John Doe) wrote:
Adam W am Mittwoch, 8. März 2006 00.49:
Sorry, I'm relatively new to programming in general (perl is my first
programming language), so I'm not sure what you mean by "sanitizing."
Could also be "sanitising", saw both :-)
I've seen it both ways, as well (I thin
Adam W am Mittwoch, 8. März 2006 00.49:
> Hans Meier (John Doe) wrote:
> > Adam W am Dienstag, 7. März 2006 23.16:
> >>Hans Meier (John Doe) wrote:
[...]
> > (this dies on empty lines etc. too, and of course the input file's lines
> > should be sanitizes before, and to be on the secure side, the
>
JupiterHost.Net am Mittwoch, 8. März 2006 00.29:
> >> - "\(" instead of "[(]": more readable
>
> not according to "best practices
Hi JupiterHost.Net
I think there are more than one "best practices", although not several books
carrying this title. I can't - and don't want to - diskuss based on
"
> "TJ" == Timothy Johnson <[EMAIL PROTECTED]> writes:
TJ> I can't reproduce the error. You should contact ActiveState about this.
TJ> They're pretty good about finding these things. I believe File-Slurp is
TJ> a pure Perl module, so you should be able to just copy the Slurp.pm file
T
Hans Meier (John Doe) wrote:
Adam W am Dienstag, 7. März 2006 23.16:
Hans Meier (John Doe) wrote:
just to sum up:
$test =~ s{ (.*?) \( (.*?) \) }
{$1}xsg;
- "\(" instead of "[(]": more readable
- no /m modifier : unnecessary without ^/$-anchors
- /s : may
- "\(" instead of "[(]": more readable
not according to "best practices
- no /m modifier : unnecessary without ^/$-anchors
Still a good habit to get into according to 'best practices' (and to get
used to what it does to \A \z and ^ $
- /s : may be appropriate for
Adam W am Dienstag, 7. März 2006 23.16:
> Hans Meier (John Doe) wrote:
> > just to sum up:
> >
> > $test =~ s{ (.*?) \( (.*?) \) }
> > {$1}xsg;
> >
> > - "\(" instead of "[(]": more readable
> > - no /m modifier : unnecessary without ^/$-anchors
> > - /s : may b
Hans Meier (John Doe) wrote:
Adam,
just to sum up:
$test =~ s{ (.*?) \( (.*?) \) }
{$1}xsg;
- "\(" instead of "[(]": more readable
- no /m modifier : unnecessary without ^/$-anchors
- /s : may be appropriate for your html source text
:-)
Hans
The contex
use Acme::Spork;
print 1;
spork(
sub {
sleep 5;
print "child\n"
},
);
print "parent\n";
and the standard:
my $child = fork ();
unless ($child) {
sleep 5;
print "child\n";
}
print "parent\n" if $child;
On 3/7/06, Chas Owens <[EMAIL PROTECTED]> wrote:
> On 3/7/06, Jay Savage <[EMAIL PROTECTED]> wrote:
> snip
> > Since eval traps die, 'eval{ eval {} or die [EMAIL PROTECTED];};' is a
> > convenient
> > method for propagating $@ out of deeply nested evals. It's just a way
> > to save writing lots of
On 3/5/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
>
>
> Saurabh Singhvi wrote:
> > thanks for all the help!!!> >
> > I am gonna try out all of them and settle with the best :).
>
> You'll likely want Acme::Spork's spork() because:
>
> a) You can run zillions of processes at the same time withou
On 3/7/06, Jay Savage <[EMAIL PROTECTED]> wrote:
snip
> Since eval traps die, 'eval{ eval {} or die [EMAIL PROTECTED];};' is a
> convenient
> method for propagating $@ out of deeply nested evals. It's just a way
> to save writing lots of if blocks that do nothing but pass $@ along.
snip
You had b
DiGregorio, Dave am Dienstag, 7. März 2006 19.30:
> Ok, I am trying to run another perl script from a perl script and have
> had little luck in doing so. The main script is in one directory and
> the one it is controlling is in another directory. the main script
> starts and calls the other scrip
I can't reproduce the error. You should contact ActiveState about this.
They're pretty good about finding these things. I believe File-Slurp is
a pure Perl module, so you should be able to just copy the Slurp.pm file
into perl\site\lib\File and you should be good.
-Original Message-
Fro
and once again, I lament the lack of the list in the reply-to field...
On 3/7/06, Jay Savage <[EMAIL PROTECTED]> wrote:
> On 3/7/06, DiGregorio, Dave <[EMAIL PROTECTED]> wrote:
> > Ok, I am trying to run another perl script from a perl script and have
> > had little luck in doing so. The main scr
>From 'perldoc perlop':
"The following escape sequences are available in constructs that
interpolate but not in transliterations.
\l lowercase next char
\u uppercase next char
\L lowercase till \E
\U uppercase till \E
\E end
At the line: if($_ =~ m/ORA-/ ){
a) you don't need the m/ just /
b) what are you expecting to be in $_ and have you checked (print stderr
"$_";)?
Kind regards,
Mark Anderson
SMS Deployment
The Royal Bank of Scotland
113 Dundas Street, Edinburgh, EH3 5DE
http://www.manufacturing.rbs.co.uk/GTr
I hope you meant
chdir("C:\\Go\\Here\\")...
but if you're going to do use absolute paths anyway, why not just
system("perl \"c:\\go\\here\\somescript.pl\"")...
?
-Original Message-
From: DiGregorio, Dave [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 10:3
On 3/7/06, Tom Allison <[EMAIL PROTECTED]> wrote:
> $one = 'this (is a) 1/2 measure example';
>
> Try and run that through a regex like
>
> if ( $two =~ /$one/ ) {
I think you're looking for the quotemeta() operator, and its cousin
the \Q escape. See perlfunc. Hope this helps!
--Tom Phoenix
Ston
No need to install Win32::GUI for this. The standard Win32 module has a
MsgBox function.
Do a 'perldoc Win32' and you'll see the list of methods that are
available.
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 3:23 AM
To: Rob Coops;
Here's my problem:
$one = 'this (is a) 1/2 measure example';
Try and run that through a regex like
if ( $two =~ /$one/ ) {
and it's pretty ugly.
Who do I get the literal string for $one?
In this case I think it would be something like:
$two =~ /this \(is a\) 1\/2 measure example/
--
To unsu
Actually I had forgotten the additional back slashes when I generalize
the name. So the problem still exists.
Thanks
DRD
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Tom Phoenix
Sent: Tuesday, March 07, 2006 1:48 PM
To: DiGregorio, Dave
Cc: beginners
On 3/7/06, DiGregorio, Dave <[EMAIL PROTECTED]> wrote:
> chdir("C:\Go\Here\") || die "cant not change dir\n" ;
The backslash is Perl's general magic character. It always means that
the next character is something special. Anywhere in Perl, if you
don't want backslash magic, if you intend a real b
Try this...
$cmCmd->Properties('Output stream')->{'Value'} = $sResponseStream;
I can't test it but I think that's the correct invocation.
Steven
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Luke Bakken
Sent: Monday, October 10, 2005 2:25 PM
To: [EM
thinbrowser wrote:
also, try printing in a editor that captures ouput,
and also allows you to submit arguments just like on a command prompt.
Crimson Editor (windoz freeware) does that.
Let us know if anything you try .. works?
Thanks for all the great advice. I was able to track down the pro
Hello all,
I'm trying to use Win32::OLE (version 0.1703) and the ADODB objects to
retrieve XML being produced by a stored procedure on SQL server. I
used the following code as a guide:
http://msdn.microsoft.com/library/en-us/dnsqlmag2k/html/adoxmlListing_02.txt
If I create a VB project using the
Ok, I am trying to run another perl script from a perl script and have
had little luck in doing so. The main script is in one directory and
the one it is controlling is in another directory. the main script
starts and calls the other script which is supposed to read a file.
However, I get can not
On 3/7/06, Adrian Diezig <[EMAIL PROTECTED]> wrote:
> system "su - qipadmin -c 'rsync -e ssh -p
> $otherip:/opt/named/current/conf/db.* /opt/named/current/conf --exclude
> *.jnl*'"
Since there are shell metacharacters in that string, Perl will pass it
to the shell for handling. The Perl part seem
On 3/7/06, Ryan Frantz <[EMAIL PROTECTED]> wrote:
>
>
> > -Original Message-
> > From: Curt Shaffer [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 07, 2006 11:06 AM
> > To: beginners@perl.org
> > Subject: mail list via script
> >
> > I have a need to mail 1000 users their usernames and
Hi;
Could someone explain what functionality I don't have or issues that I
might experience as a result of these warning(s) and/or error(s) that I
receive when installing file-slurp from the ActiveState repository via
ppm (using ActiveState Perl version 5.8.7.815)? What can I or should I
do to
-Original Message-
From: Ryan Frantz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 11:28 AM
To: Curt Shaffer; beginners@perl.org
Subject: RE: mail list via script
> -Original Message-
> From: Curt Shaffer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 07, 2006 11:2
> -Original Message-
> From: Curt Shaffer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 07, 2006 11:21 AM
> To: Ryan Frantz; beginners@perl.org
> Subject: RE: mail list via script
>
>
>
> -Original Message-
> From: Ryan Frantz [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March
Thanks for the response! The problem I have with this solution is I need to
send both a username and a password (i.e. two values) per email. Can I add
another value to the hash like this: [EMAIL PROTECTED] =>
'abc123','321cba',?
my %users = (
'[EMAIL PROTECTED]' => [$johnuser, $johnpass],
-Original Message-
From: Ryan Frantz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 11:09 AM
To: Curt Shaffer; beginners@perl.org
Subject: RE: mail list via script
> -Original Message-
> From: Curt Shaffer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 07, 2006 11:0
On 3/6/06, Tom Allison <[EMAIL PROTECTED]> wrote:
> Jay Savage wrote:
>
> >
> > die on errors and just keep passing them up the line:
> >
> > eval {
> > eval {
> > eval {
> > bad_system_call() or die "$!\n";
> > } or die $@;
> > } or die $
> -Original Message-
> From: Curt Shaffer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 07, 2006 11:06 AM
> To: beginners@perl.org
> Subject: mail list via script
>
> I have a need to mail 1000 users their usernames and passwords, this
will
> be
> a 1 time thing. I was thinking that I
I have a need to mail 1000 users their usernames and passwords, this will be
a 1 time thing. I was thinking that I could just do some sort of foreach
routine but I can't see how that will work when they will all be different.
I then thought a hash with the usernames and passwords would be OK, but t
On Mar 7, 2006, at 15:47, Saurabh Singhvi wrote:
Hi all
thanks for the reply.
The gzip and zcat ones seem like what i was looking for.
But about the reading part:
I was using the same way for reading. I thought that was the
standard way.
But the thing is even though i am readin the file l
Hi all
thanks for the reply.
The gzip and zcat ones seem like what i was looking for.
But about the reading part:
I was using the same way for reading. I thought that was the standard way.
But the thing is even though i am readin the file line by line, the file is
loaded
completely to the memor
On Tue, 7 Mar 2006, Irfan J Sayed wrote:
|Hi,
|
|Is ther any function in perl to compare the dates ?
|
|if yes then what is the syntax
Before posting please remove the irrelevant part of the messages.
And the answer to your query is yes. Look for Date::Calc in cpan.org and
as for the syntax find
Saurabh Singhvi wrote:
> Hi
Hello,
> #!/usr/bin/perl
>
> open(FILE,'file') or die "Couldn't open $!";
> while (1){
> ..
> ...
> }
> }
>
> This is a sample code i am using to read a file
> Now the issue here is that the complete file gets loaded into memory at once
> and
From: "Irfan J Sayed" <[EMAIL PROTECTED]>
> Hi,
>
> Is ther any function in perl to compare the dates ?
>
> if yes then what is the syntax
>
Read:
perldoc -f time
perldoc -f localtime
Search with search.cpan.org for "date" and choose a module that does what
you want.
--
To unsubscribe, e-mai
Hi,
Is ther any function in perl to compare the dates ?
if yes then what is the syntax
Regards
Irfan Sayed
"Octavian Rasnita" <[EMAIL PROTECTED]>
03/07/2006 04:53 PM
To
"Rob Coops" <[EMAIL PROTECTED]>, Irfan J Sayed/India/[EMAIL PROTECTED]
cc
Subject
Re: msgbox in perl script
You
On Mar 7, 2006, at 12:33, Saurabh Singhvi wrote:
Hi
#!/usr/bin/perl
open(FILE,'file') or die "Couldn't open $!";
while (1){
..
...
}
}
This is a sample code i am using to read a file
Now the issue here is that the complete file gets loaded into
memory at once
and t
Saurabh Singhvi wrote:
Hi
#!/usr/bin/perl
open(FILE,'file') or die "Couldn't open $!";
while (1){
..
...
}
}
This is a sample code i am using to read a file
Now the issue here is that the complete file gets loaded into memory at once
and then the
following job of parsi
Hi
#!/usr/bin/perl
open(FILE,'file') or die "Couldn't open $!";
while (1){
..
...
}
}
This is a sample code i am using to read a file
Now the issue here is that the complete file gets loaded into memory at once
and then the
following job of parsing gets done. Is there a
You need to install the module Win32::GUI, then you can use something like:
use Win32::GUI;Win32::GUI::MessageBox(undef, "Message", "Title", MB_OK);
Teddy
- Original Message -
From: "Irfan J Sayed" <[EMAIL PROTECTED]>
To: "Rob Coops" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, March 07, 200
I have two identical (HW&SW) linux servers in my network. On both there is a
user called qipadmin, which can access over SSH to each other.
I wrote a perl script, which should copy files with rsync from one server to
the other. Below is the rsync command in the script.
The script is invoked by the
HI ,
I need to pop up one mesage box after the execution of the specific
condition.
For example:-
I am compairing two dates . if the date entered by user is less than
todays date then one message box should popup saying that " please enter
date grater that todays date"
how to achieve this ?
Hi Irfan,
Take a look at http://search.cpan.org/search?query=msgbox&mode=all
Dhanashri
-Original Message-
From: Rob Coops [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 4:26 PM
To: Irfan J Sayed
Cc: beginners@perl.org
Subject: Re: msgbox in perl script
Hi Irfan,
Could you b
Hi Irfan,
Could you be a little more specific. What do you have and what are you
trying to do?
Even though msgbox is a term that is very familair to you most of us might
not have any idea what you mean or call this thing by a slightly diffrent
name.
The more details you can give the better the a
Hi ,
I need to use msgbox in my per script . can anybody tell me what is the
syntax.
Plz let me know.
Regards
Irfan Sayed
57 matches
Mail list logo