Somu wrote:
> I'm not certain about what EXPR is..
EXPR is any valid Perl expression.
> How do i use glob?
perldoc -f glob
perldoc File::Glob
> My next question is regarding opening pipes. I tried the following:
> open ( FH , " notepad " );
> print FH 'hello' ;
| is the pipe character so somet
open FH,">","notepad" or die $!; # create a new file
open FH,">>","notepad" or die $!; # append to a file,if not
exists,then create one
see "perldoc -f open".
2007/4/27, Somu <[EMAIL PROTECTED]>:
I'm not certain about what EXPR is.. How do i use glob?
My next question is regarding opening pi
I'm not certain about what EXPR is.. How do i use glob?
My next question is regarding opening pipes. I tried the following:
open ( FH , " notepad " );
print FH 'hello' ;
But its only opening the notepad application, and nothing shows up on
the notepad..
--
To unsubscribe, e-mail: [EMAIL PROTECT
Thanks. I got that corrected. Actually, in my code, $n wasnt a
Math::BigFloat OBJECT.
On 4/25/07, Rob Dixon <[EMAIL PROTECTED]> wrote:
Somu wrote:
> On 4/25/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
>>
>> On 4/24/07, Somu <[EMAIL PROTECTED]> wrote:
>>>
>>> I'm unable to compare numbers using th
$q contains decoded msgs using MIME::Base64, and is any random word
from a dictionary of 45000 words.
On 4/26/07, Dr.Ruud <[EMAIL PROTECTED]> wrote:
Somu schreef:
> why wont the following work?
>
> $$q = shift;
print length($$q), " ";
$$p = "pass";
> if ( $$q =~ m/$$p/i ) { print 'match' }
Pierre Mariani wrote:
Hello everyone,
I have a 'modify_variable' function that, well, modifies a variable.
I want to run it on several variables.
I have the following code that:
- builds an array of references on the variables,
- calls the function on the content of the reference,
- set the co
Hi Pierre,
my @tmp = ( $var1, $var2, $var3 );
@tmp = map modify_variable, @tmp;
which is better
Conway (in Perl Best Practices) prefers the block form of map, since in
his opinion, it's more readable. So you could rewrite it as:
my @tmp = ( $var1, $var2, $var3 );
@tmp = map { modify_variab
On 4/26/07, charlie farinella <[EMAIL PROTECTED]> wrote:
I have a script which uses Net::FTP to upload a backup file each night.
It sends me an email each night if it succeeds and a different email if
any of the methods fail. This all works, but sometimes the ftp
connection times out and my scr
On Thu, Apr 26, 2007 at 03:26:02PM -0700, Pierre Mariani wrote:
> anyone know how to create an array of references?
my @a = \($a, $b, $c);
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ht
> # $var1, $var2 and $var3 are set previously
>
> > for ( \$var1,
> >\$var2,
> >\$var3,
> >)
> >
> > {
> >${$_} = modify_variable ( ${$_} );
> > }
> >
> > Questions:
> > - How do I improve my array definition?
> > - How to I call the modify_
On 4/26/07, yitzle <[EMAIL PROTECTED]> wrote:
sub parseHtmlData($@) {
my $hRef = shift; my %dHash = %$hRef;
You've just made %dHash a copy of the data in the hash referred to by
$hRef. You can do all you want with the copy, but it won't change the
original hash.
One solution would be
Perfect canidate for Map.
On 4/26/07, Pierre Mariani <[EMAIL PROTECTED]> wrote:
Hello everyone,
I have a 'modify_variable' function that, well, modifies a variable.
I want to run it on several variables.
I have the following code that:
- builds an array of references on the variables,
- calls
Something's not working... and I'm not sure where.
I'm modifying working code and trying to make the hash non-global.
If %dHash is global, it all works perfectly well.
But when I try to pass it around... the writeHashToFile makes a 0 byte file.
I would appreciate if you could check if I'm passin
Hello everyone,
I have a 'modify_variable' function that, well, modifies a variable.
I want to run it on several variables.
I have the following code that:
- builds an array of references on the variables,
- calls the function on the content of the reference,
- set the content of the reference t
On 4/26/07, Steve Pittman <[EMAIL PROTECTED]> wrote:
I want to spawn a kornshell script
Well, nobody's perfect.
- track the PID - and restart the script if the PID is destroyed. Can anyone
point me to a Perl reference for this?
Do you really need to track the PID?
while (1) {
# resta
All,
I want to spawn a kornshell script - track the PID - and restart the script if
the PID is destroyed. Can anyone point me to a Perl reference for this?
Thanks,
Steve
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I have a script which uses Net::FTP to upload a backup file each night.
It sends me an email each night if it succeeds and a different email if
any of the methods fail. This all works, but sometimes the ftp
connection times out and my script hangs without sending anything.
I don't know how
On Thu, Apr 26, 2007 at 01:38:02AM +0100, Seanie wrote:
> As a general rule, if your script contains 'system()' anywhere in it, you've
> done it wrong.
I think this is a little strong. Or a little general. Or something.
Sometimes a calling system() is exactly the right thing to do.
Sometimes
On 04/26/2007 07:05 AM, Nath, Alok (STSD) wrote:
Hi ,
Can somebody help me out ?
I wanted to switch io redirection between log file and
standard display device.Basically sometimes I want to
print into a log file and other time to the display device.
[...]
"perldoc -f open"
Dave Adams wrote:
When generating a file with XML::Writer the script certainly builds the
file but when I go to test for it, it fails. Does anyone have a reason why?
How do I create a file that I can use in the rest of my script?
use XML::Writer;
use IO::File;
my $output = new IO::File(">tes
When generating a file with XML::Writer the script certainly builds the file
but when I go to test for it, it fails. Does anyone have a reason why? How
do I create a file that I can use in the rest of my script?
use XML::Writer;
use IO::File;
my $output = new IO::File(">test.xml");
my $writer =
On Tue, 2007-04-24 at 14:44 -0400, [EMAIL PROTECTED] wrote:
> Hi,
>
> Recently i wrote a perl module that includes package and a script.
> As part of the module sanity tests, I would like to run the script and verify
> a success.
> For that, I am using Test::More and Test::Simple.
> Is there any
On Wed, 2007-04-25 at 10:20 -0500, Kevin Viel wrote:
>Thanks. I have been using this program without problem for a while,
> I'd like to say over a year, but I am not sure.
>
>So, could it be that somehow the environment path variable relating
> to perl had been changed? Otherwise, I c
On Wed, 2007-04-25 at 17:15 -0700, Nishi wrote:
> Hi:
>
> The File::Basename from 5.8.0 doesnot work in Perl 5.8.2 or Perl 5.8.7. Is
> there any particular reason.
Are yhou using activestate or cygwin perl. cygwin will do that because
the filename you provided is not a cygwin filename. cygpath
2007/4/26, Nath, Alok (STSD) <[EMAIL PROTECTED]>:
Hi ,
Can somebody help me out ?
I wanted to switch io redirection between log file and
standard display device.Basically sometimes I want to
print into a log file and other time to the display device.
To redire
Hi ,
Can somebody help me out ?
I wanted to switch io redirection between log file and
standard display device.Basically sometimes I want to
print into a log file and other time to the display device.
To redirect I am using this
open (STDOUT, ">>
Somu schreef:
> why wont the following work?
>
> $q = shift;
print length($q), "\n";
> $p = "pass";
> if ( $q =~ m/$p/i ) { print 'match' }
>
> But it works on changing the $q and $p places..
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
yitzle schreef:
> What's the best way to apply a RegEx to an array? For loop?
> @arr = qw/dc2ds reew12dsfa df2fdw/;
> s/$find/$replace/ for(@arr);
Consider:
s/\Q$find/$replace/ for(@arr);
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
On Apr 26, 2007, at 2:34 AM, Nishi wrote:
What is the equivalent of basename? Ie if I dont want to use basename
package to get the filename off a path, what reg expr can i use in
perl?
File::Basename is a standard module, why you don't want to use it?
-- fxn
--
To unsubscribe, e-mail: [
29 matches
Mail list logo