unlink($afile) or warn "Cannot delete $afile. $!";
}
}
}
Hope that helps
Yaron Kahanovitch
- Original Message -
From: "Craig Schneider" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Tuesday, April 10, 2007 2:19:40 PM (GMT+0200) Auto-De
takes the $version a treat
it as a regular expression.
I don't think that this is what you want. You actually want something like
$version =~ /8\.1\.8/.
Yaron Kahanovitch
- Original Message -
From: "Rodrigo Tavares" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Wedne
Hi,
What type of mail mechanism are you using?
Do you really use sendmail or connect smtp server?
Yaron Kahanovitch
- Original Message -
From: "Chas Owens" <[EMAIL PROTECTED]>
To: "Anish Kumar K" <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Sent: Thursday
Hi,
Lets set it to 200 secs
use Net::FTP;
my $ftp = new Net::FTP(hostnale,Timeout => 200);
...
- Original Message -
From: "Paul" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Thursday, April 12, 2007 5:33:30 PM (GMT+0200) Auto-Detected
Subject: How to set FTP module time out?
I see
Hi,
I am using cpan to install modules.
>From time to time I have to uninstall a module.
Untill now I did not find a tool to do it.
Is there an official tool for this?
Thanks in advanced,
Yaron Kahanovitch
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
Hi,
Thanks for the reply, I think that I understand you point.
Now I am starting to fear cpan installations.
Is there a chance that by doing a simple - naive cpan installation of a module
I, potentially, can damage another installed module?
Best regards,
Yaron Kahanovitch
- Original
/CPANPLUS/Error.pm
- K/KA/KANE/CPANPLUS-0.78.tar.gz..pm blib/lib/CPANPLUS/Internals/Constants.pm
Cannot continue.Dist/Base.pm blib/lib/CPANPLUS/Dist/Base.pm
I am tring to install cpanplus on a cygwin.
Has anyone a clue for that?
Best regards,
Yaron Kahanovitch
--
To unsubscribe, e-mail: [EMAIL
How about
use lib split("\s+",$ENV{PATH});
Yaron Kahanovitch
- Original Message -
From: "Klaus Jantzen" <[EMAIL PROTECTED]>
To: "Beginner Perl"
Sent: 10:35:39 (GMT+0200) Asia/Jerusalem יום שני 23 אפריל 2007
Subject: Environment variable
I l
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 recommendations how to do this?
Thanks,
Yaron Kahanovitch
--
To
Hi,
I think that you have a little mistake
Run perl -MNet::FTP::Recursive -e "1;" instead of perl -MNet::Ftp::Recursive -e
"1;".
Yours,
Yaron Kahanovitch
- Original Message -
From: "I.B." <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Wednesday,
om# or
$uri =~ s#www\.example\.com/([wulp])/#$1.example.com/#;
print $uri;
}
Best regards
Yaron Kahanovitch
- Original Message -
From: "Jen mlists" <[EMAIL PROTECTED]>
To: "beginners perl"
Sent: Saturday, April 28, 2007 10:57:07 AM (GMT+0200) Auto-Detected
S
Hi,
The line --> my %test = my($fname, $fvalu)=split(/=/, $test);
Will insert only two elements into %test.
Try:
my %test = split (/=/,$test);
Yaron Kahanovitch
- Original Message -
From: "Goksie" <[EMAIL PROTECTED]>
To: "Perl Beginners"
Sent: Sunday, A
Hi all,
Is there a perl built in function that search a value in sorted array?
Although I found such an algorithm in the cpan (Search::Binary), I wonder if
there is an efficient solution within the core perl.
Thanks in advanced,
Yaron Kahanovitch
--
To unsubscribe, e-mail: [EMAIL PROTECTED
You need to quote the sss and ttt
use strict;
use warnings;
my $x=param("hhh");
my $y=param("sss");
my $z=param("ttt");
Yaron Kahanovitch
- Original Message -
From: "sivasakthi" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Thursday, Ma
Just a guess but maybe you shout use this:
foreach my $child (sort keys( %{$parent{$pid}} )) {
dump_process( $child );
}
Yaron Kahanovitch
- Original Message -
From: "Ken Foskey" <[EMAIL PROTECTED]>
To: "Perl Beginners"
Sent: 16:48:17 (GMT+0200
Hi,
If you wish to read, change xml tree structure and create a xml string again
than XML::TreePP
(http://search.cpan.org/~kawasaki/XML-TreePP-0.19/lib/XML/TreePP.pm) should be
helpfull.
Yaron Kahanovitch
- Original Message -
From: "xavier mas" <[EMAIL PROTECTED]&g
Hi,
in stric mode you need to avoid soft references like this.
Instead you can store the buttons in a hash:
use Tk;
use strict;
my $mw = MainWindow->new;
my %buttons = ();
for(my $i=1;$i<=100;$i++){
my $bt='b'.$i;
$buttons{$bt} = $mw->Button->pack;
}
MainLoop;
ach my $prime_id ( @id_hits ) {
foreach my $line( @lines ) {
if ( $line =~ /$prime_id/ ) {
print "$line\n";
next;
}
}
}
Hope that helps
Yaron Kahanovitch
- Original Message -
From: "Robert Hicks" <[EMAIL PROTECTED]
);
$p->handler( text => \&text_handler, "dtext");
$p->parse($z);
print $text;
Yaron Kahanovitch
- Original Message -
From: "Michael Goopta" <[EMAIL PROTECTED]>
To: "Perl Help"
Sent: Wednesday, May 9, 2007 4:32:04 PM (GMT+0200) Auto-Dete
HI again,
You can consider using HTML::FormatText. This module returns a nice formatted
text out of html data.
Hope that helps
Yaron Kahanovitch
- Original Message -
From: "Michael Goopta" <[EMAIL PROTECTED]>
To: "Perl Help"
Sent: Wednesday, May 9, 2007
Hi,
I am not sure that I understand your problem.
In General if you want to check the existence of the key "user" in the first
hash, you can use the following
if ($dept and exists($dept->{user}){ }else{}
Hope that helps
Yaron Kahanovitch
- Original Message -
Hi again,
In that case can use the following:
if ($dept and exists($dept->{customer}{user}){ }else{}
Yaron Kahanovitch
- Original Message -
From: "Mathew Snyder" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: "Perl Beginners"
Sent: Sunday, May 13, 200
Hi,
>From your question I understand that you are looking for the join commang:
my $var = join ("delimiter",[EMAIL PROTECTED]);
Hope that helps
Yaron Kahanovitch
- Original Message -
From: "Romeo Theriault" <[EMAIL PROTECTED]>
To: beginners@perl.org
S
i again
A little correction:
my $var = join ("delimiter",@$array_ref);
Yaron Kahanovitch
- Original Message -
From: [EMAIL PROTECTED]
To: "Romeo Theriault" <[EMAIL PROTECTED]>
Cc: beginners@perl.org
Sent: 23:53:23 (GMT+0200) Asia/Jerusalem יום חמישי 17 מ
Hi,
I think that you are looking for a serialization mechanism.
For that you can use the Storable module
(http://search.cpan.org/~ams/Storable-2.16/Storable.pm)
All you need to do is to freeze the variable in the first process, send it by
pipe and thaw it in the other process.
Yaron
)
@keywords=sort(@keywords);
my $diff = Array::Diff->diff( [EMAIL PROTECTED], [EMAIL PROTECTED] );
print "1\n" if $diff->count;
$diff = Array::Diff->diff( [EMAIL PROTECTED], [EMAIL PROTECTED] );
print "2\n" if $diff->count;
This might give you a hint.
Yaron Kah
,
Yaron Kahanovitch
- Original Message -
From: "Jeff Pang" <[EMAIL PROTECTED]>
To: "Perl Beginners"
Sent: 11:45:43 (GMT+0200) Africa/Harare יום שלישי 22 מאי 2007
Subject: Query an IP from file
Hello,
I have a text file which contains lots of IPs,like:
58
www.dictionary.com (and use the perl module WWW::Dictionary
http://search.cpan.org/~cog/WWW-Dictionary-0.01/lib/WWW/Dictionary.pm) or even
wikipedia (WWW::Wikipedia at
http://search.cpan.org/~bricas/WWW-Wikipedia-1.92/lib/WWW/Wikipedia.pm).
You can manu more dictionaries in the cpan.
Yaron
Hi,
Did you try to use Net::FTP::Recursive
(http://search.cpan.org/~jdlee/Net-FTP-Recursive-2.00/Recursive.pm)
It seems to fit to your task.
Yaron Kahanovitch
- Original Message -
From: "Shu Cho" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Thursday, May 24, 2007
my ($field,$value) = each %$hash_ref) {
print "Fieal = $field, value = $value\n";
}
}
Hope that helps
Yaron Kahanovitch
- Original Message
-
From: "pauld" <[EMAIL PROTECTED]>
To: beginners@perl.org, [EMAIL PROTECTED]
Sent: 14:17:57 (GMT+0200) A
Hi,
Be aware that you have a small problem.
Your script includes:
for (my $j=1;$j<$#rows;$j++)
...
for (my $i=0;$i<$#columns;$i++)
I think It should be
for (my $j=1;$j<=$#rows;$j++)
...
for (my $i=0;$i<=$#columns;$i++)
Cheers
Yaron Kahanovitch
- Original Message -
Hi
You might want to take a look at Array::Diff
http://search.cpan.org/~typester/Array-Diff-0.04/lib/Array/Diff.pm
Yaron Kahanovitch
- Original Message -
From: "Sumit" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Monday, July 9, 2007 10:43:48 AM (GMT+0200) Auto-
Hi,
I am looking for an efficient way to get list of child (forked) processes of a
given processes id.
Has anyone idea how to do it in "pure perl style" ?
Thanks in advance,
Yaron Kahanovitch
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
::Forking object.
Yours,
Yaron Kahanovitch
- Original Message -
From: "Jeff Pang" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Wednesday, July 11, 2007 10:18:12 AM (GMT+0200) Auto-Detected
Subject: Re: How to get a list of child processes (Unix systems only)
--- [EMAIL
Hi,
Thanks for the reply,
Indeed our code solves the problem but not efficiently.
Your have to iterate over all running processes in order to filter the child
processes.
I wondered if there is a possibility to directly get the child processes.
anyway thanks,
Yaron Kahanovitch
Thanks,
Seems so logical.
Yaron Kahanovitch
- Original Message -
From: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: "Paul Lalli" <[EMAIL PROTECTED]>, beginners@perl.org
Sent: Thursday, July 12, 2007 12:59:02 PM (GMT+0200) A
Hi,
You can use File::stat.
perldoc -f stat
or
http://search.cpan.org/~nwclark/perl-5.8.8/lib/File/stat.pm
Yaron Kahanovitch
- Original Message -
From: "Sam DeForest" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Sunday, July 15, 2007 8:05:15 AM (GMT+0200) Auto-
nce breaking complicated regular expression into some small
>ones with the /\G.../gc idiom improve performance.
Yaron Kahanovitch
- Original Message -
From: "JeeBee" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: 11:49:24 (GMT+0200) Africa/Harare יום רביעי 18 יולי 2007
You can always choose to walk the kings road:
use Filesys::DiskSpace;
($fs_type, $fs_desc, $used, $avail, $fused, $favail) = df $dir;
$total = $used + $avail;
print "Total:$total\nUsed:$used\ n";
Yaron Kahanovitch
- Original Message -
From: "kapil.V" <[EMAIL PR
as/libwww-perl-5.806/lib/HTTP/Status.pm for
details
Hope that helps
Yaron Kahanovitch
- Original Message -
From: "Javier Prats" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Monday, July 23, 2007 5:04:58 PM (GMT+0200) Auto-Detected
Subject: Simple loop issue
Hello
HI Tatiana,
There is a special module that specialize in such tasks: WWW::Mechanize
You can take a look at a similar question at:
http://search.cpan.org/~petdance/WWW-Mechanize-1.30/lib/WWW/Mechanize/FAQ.pod#How_do_I_handle_frames?
Good luck
Yaron Kahanovitch
- Original Message -
From
Hi,
Perl has a built in function that do just that:
if (my $username = getpwuid($input_uid)) {
print "Founf the user $username\n";
} else {
print "No user found\n";
}
for help try
perldoc -f getpwent
perldoc -f getpwnam
perldoc -f getpwuid
BFN
Yaron Kahanovi
Hi,
I would say that cpan does just that.
Just run perl -MCPAN -e shell
and..
>> install XML::RSS
For more help see http://cpan.uwinnipeg.ca/htdocs/CPAN/CPAN.html
BFN,
Yaron Kahanovitch
- Original Message -
From: "Jerry Krinock" <[EMAIL PROTECTED]>
To: beginner
Hi...
open (IMAGE, $imgfile) || die "Can't Open $imgfile\n";
binmode(IMAGE);
open (OUTPUT, ">$outputfile") || die "Can't Open $outputfile\n";
binmode(OUTPUT);
my $buf;
my $bufSize = 4096;
while (read(IMAGE,$buf,$bufsize)) { pri
See http://www.perl.com/doc/manual/html/pod/perlop.html
Yaron Kahanovitch
- Original Message -
From: "Ryan Dillinger" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: 21:06:55 (GMT+0200) Africa/Harare יום ראשון 29 יולי 2007
Subject: Precedence?
Hello,
I have written this
Hi Jerry,
Most of the perl distribution comes with cpan.
If you don't have cpan by default (say you work with active perl),
I suggest you work with distribution that supplies cpan. If you work on windows
I reccomend to work with cygwin
(http://www.cygwin.com/).
Best regards,
Yaron Kahano
Hi,
Did you try to use XML::TrePP. It seems to fit your needs.
http://search.cpan.org/~kawasaki/XML-TreePP-0.22/lib/XML/TreePP.pm
Yaron Kahanovitch
- Original Message -
From: "Prabu Ayyappan" <[EMAIL PROTECTED]>
To: "perl Beginner"
Sent: Wednesday, August 1,
Small correction
Try
open my F, '>outputsample1' or
die 'Failed to open outputsample1';
my $f = \*F;
while (($key, $value) = each %hash)
{
print $f $value."\n";
}
close $f;
Yaron Kahanovitch
- Original Message -
From: [EMAIL PROT
mple1';
while (($key, $value) = each %hash)
{
print $f $value."\n";
}
close $f;
Try
open my F, '>outputsample1' or
die 'Failed to open outputsample1';
my $f = \*F;
while (($key, $value) = each %hash)
{
print F $value."\n&quo
Hi,
The code was tested. and it compiles for mee
Yaron
- Original Message -
From: "Rob Dixon" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Wednesday, August 1, 2007 2:23:44 PM (GMT+0200) Auto-Detected
Subject: Re: Removing duplicate records
[EMAIL PROTECTED]
6
I would like to accomplish that with range operator. But the following script
will add the FROM ann the END line to the output.
Is there an efficient way to do that.
In other words I would like to have range operator that will return true for
all the line inside the range not includin
Hi Chas and Jeff,
Thanks for your detailed answers. From chas answer I understand that this
problem is addressed in perl 6.
So, I will have to wait a bit
In the meanwhile I will have to write my own "smart" flipflop.
BFN
Yaron Kahanovitch
- Original Message -
F
Hi,
my $id = qr(shift); will not work from the same reason that
my $id = "shift" will not work!!!
Yours,
Yaron Kahanovitch
- Original Message -
From: "yitzle" <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Sunday, August 12, 2007 7:55:38 AM (GMT+0200)
Hi,
Take a look at Net::IP
http://search.cpan.org/~manu/Net-IP-1.25/IP.pm
Yaron Kahanovitch
- Original Message -
From: [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Monday, August 13, 2007 7:30:27 AM (GMT+0200) Auto-Detected
Subject: first ip and last ip
Hello,
Given this ip range
Hi,
You can always read a file backwards until you reach a position that was
already processed.
This can be done by using File::ReadBackwards.
Hope that helps
Yaron Kahanovitch
- Original Message -
From: "sivasakthi" <[EMAIL PROTECTED]>
To: "beginners perl"
/Mechanize.pm
end some useful examples at
http://search.cpan.org/~petdance/WWW-Mechanize-1.30/lib/WWW/Mechanize/Examples.pod
Yaron Kahanovitch
- Original Message -
From: "perl pra" <[EMAIL PROTECTED]>
To: "Beginners List"
Sent: Monday, August 27, 2007 10:13:25 A
Hi,
I think that you are looking for a "zero-width positive lookahead assertion"
i.e. (?=...)
So a solution for problem might be:
my $line = ",.,.,.";
$line =~ s/,\.(?=,|$)/,/g;
TTFN
Yaron Kahanovitch
- Original Message -
From: "Kevin Viel" <
Hi,
You can also try use Regexp::Common::Email::Address.
See
http://search.cpan.org/~cwest/Regexp-Common-Email-Address-1.01/lib/Regexp/Common/Email/Address.pm
Yaron Kahanovitch
- Original Message -
From: "Andrew Curry" <[EMAIL PROTECTED]>
To: "Andrew Curry" &
Hi,
I think you don't run the script under perl
try: perl
Any way, if you are using Unix system, look at your script and figure if the
first line have the shbang "#!/usr/bin/perl"
Yaron Kahanovitch
- Original Message -
From: "Irfan Sayed (Irfan)" <[EMA
Hi,
Sorry my mistake its not a shbang problem...
Yaron
- Original Message -
From: [EMAIL PROTECTED]
To: "Irfan Sayed (Irfan)" <[EMAIL PROTECTED]>
Cc: beginners@perl.org
Sent: Wednesday, October 24, 2007 7:06:47 PM (GMT+0200) Asia/Jerusalem
Subject: Re: qx string
Hi,
I
Hi,
Note that you can use the $? variable to get the command exit status:
Yaron Kahanovitch
- Original Message -
From: "Jeff Pang" <[EMAIL PROTECTED]>
To: "Beginner" <[EMAIL PROTECTED]>
Cc: beginners@perl.org
Sent: Wednesday, November 14, 2007 11:24
Hello,
Trying to remove from array blank lines, its look like splice get
confuse with the array size after removing the blank entry.
Or maybe I'm getting confuse..
Thanks
Dov
use strict;
my ($str0, $str1, $str2, $str3, $str4, $str5, $str6, $str7, $str8,
$str9,)
=
62 matches
Mail list logo