In “Learning Perl”, Pg. 116, is found this sentence: Whatever calculation is
last performed in a subroutine is automatically also the return value.
I have a subroutine that (almost) ends with this loop:
foreach my $line (@lines) {
$sum += evaluate($line);
}
What I want to return i
Shlomi Fish writes:
> Hi lee,
>
> I decided to try to give you another chance to be educated, despite Uri's
> conclusion in the other thread. Hopefully you won't let me down.
He has made a lot of conclusions and decided not to say anything
further. I know it can be diffi
Kent Fredric writes:
> On 26 May 2017 at 05:33, lee wrote:
>> Perl doesn't have data structures, so variables in perl are not data
>> structures. That is unfortunate.
>
>
> So when I write:
>
> my $var = {
> memory => {
>
Shlomi Fish writes:
> [...]
>> >> while ( my $numbline = ) {
>> >> chomp $numbline;
>> >> my @numbline = split //, $numbline;
>> >
>> > You're processing the input number line-by-line, but it's one whole number
>> > and the products may span across more than one line. You need to slurp
Uri Guttman writes:
> this private IMO>
>
>
> On 05/24/2017 08:20 PM, lee wrote:
>> Uri Guttman writes:
>>
>>
>> you can get an array of hashes, where each hash is one row.
>>
>> learning dereferencing will do you much more good than us
Ok, here's one more:
[...]
unless($ad) {
print " * $ad = 0\n";
$start = $digit;
next DIGITS;
}
[...]
You can skip right away to behind the 0 which has already been found
within the current range of adjacency.
lee writes:
> Sorry, I
"Chas. Owens" writes:
> You can use printf or sprintf to control the format, but what you are doing
> is called profiling and it is better to use an actual profiler. Take a look
> at Devel::NYTProf
>
> http://search.cpan.org/~timb/Devel-NYTProf-6.04/lib/Devel/NYTProf.pm
>
> https://www.perl.org/a
\n";
exit 0;
What is more expensive: Using if() statements or letting it go trough
on zeroes? Using an array or substr()?
lee writes:
> Shlomi Fish writes:
>
>> Hi all!
>>
>> Resending because the original message does not appear to have arrived
Shlomi Fish writes:
> Hi all!
>
> Resending because the original message does not appear to have arrived at the
> list.
>
> =
>
> Hi Derrick,
>
> On Tue, 16 May 2017 14:01:34 +0800
> derr...@thecopes.me wrote:
>
>> Hi All,
>>
>> I am working on problem #8 of the euler project. see below.
>>
Shawn H Corey writes:
> On Sun, 14 May 2017 18:16:50 +0100
> lee wrote:
>
>> Ok, do you see a way to do what I'm doing here by evaluating a block?
>>
>
> Simply remove it.
>
> $sth_cmds->bind_columns(@params);
But then the program doesn't wo
Shawn H Corey writes:
> On Sun, 14 May 2017 02:08:11 +0100
> lee wrote:
>
>> I haven't used 'eval' before, and this seems inherently dangerous.
>
> eval EXPR;
> eval;
>
> These are dangerous.
>
> eval BLOCK
>
> This is not
Uri Guttman writes:
> On 05/13/2017 09:08 PM, lee wrote:
>> Hi,
>>
>> would you say this acceptable or something that should be forbidden?
>>
>>
>> my $sth_cmds = $dbh->prepare_cached($sql);
>> my @params;
>> push(@params, undef)
Shlomi Fish writes:
> On Sun, 14 May 2017 12:08:59 +0300
> Shlomi Fish wrote:
>
>> Hi lee,
>>
>> On Sat, 06 May 2017 02:06:19 +0100
>> lee wrote:
>>
>> > Hi,
>> >
>> > how can a sleeping program react to a key that was presse
Hi,
would you say this acceptable or something that should be forbidden?
my $sth_cmds = $dbh->prepare_cached($sql);
my @params;
push(@params, undef) foreach(0..12);
$sth_cmds->execute();
$sth_cmds->bind_columns(eval join(', ', map('\$params[' . $_ . ']',
0..$#params)));
I haven't used 'eval'
Hi,
how can a sleeping program react to a key that was pressed without
return being pressed?
perl -e 'use Term::ReadKey; my $ke = ReadKey(10); print "k: $ke\n";'
... shows that:
+ ReadKey() returns undef after the timeout
+ ReadKey() returns undef after the timeout even when you pressed ke
r has disconnected the program
due to inactivity but not when it's disconnected due to an error in the
program.
And I need to figure that out for SNMP sessions, too. Can they even get
disconnected?
> On Mon, Apr 24, 2017, 20:02 lee wrote:
>
>> Hi,
>>
>> is it ok to
Hi,
is it ok to assign an object to a state variable? Or does doing so
involve a chance of causing problems because objects are not supposed or
designed to be used with the state-feature?
Example:
use feature qw(state);
use DBI;
sub foo {
my ($dbh, $q, $finish) = @_;
state $sth = $dbh->
Илья Рассадин writes:
> Hi!
>
> It looks like the password issue, maybe password is incorrect or not
> set properly?
Why would I need a password with perl when I don't need one with
snmpget?
It turned out to be an acl on the switch having assumed unexpected
values:
,
| #H3C-acl-basic-2000
Shlomi Fish writes:
> Hi Frank,
>
> On Sun, 23 Apr 2017 10:07:56 -0700
> SSC_perl wrote:
>
>> Is ‘vendor’ a reserved word of some type in either Perl, MySQL, or
>> DBM?
>
> It is not a reserved word of Perl. No idea about MySQL.
,
| mysql> create database vendor;
| Query OK, 1 row a
Hi,
Net::SNMP only gives a useless error message "ERROR: Received
usmStatsWrongDigests.0 Report-PDU with value 16 during synchronization."
with the number (16) increasing by 1 every time I run the program?
What is this supposed to tell me? How is it possible for the number to
be increased by 1
Shekar writes:
> Depending upon how vendor implemented SNMP part for their device, other
> than standard OID's such as sysUptime , will have custom MIB files.
> You should try visiting their website for downloading required MIB file for
> your switch.
> Then import them with -m or put it under sn
mailing lists writes:
> are you sure?
>
> # emerge -s expect
>
> [ Results for search key : expect ]
> Searching...
>
> [...]
> * dev-perl/Expect
> Latest version available:
lee writes:
> Shekar writes:
>
>> +1 for SNMP, or if Net::SSH::Perl didn't help, can you try expect module?
>
> Thanks! 'Expect' isn't available as Gentoo package, so I skipped it.
>
> SNMP is probably better, so I need to learn about that first a
e to learn about SNMP anyway :)
(BTW, I seem to be subscribed again :) )
>
> Cheers,
> Shekar
>
> On Wed, Apr 19, 2017 at 1:38 PM, lee wrote:
>
>> Duncan Ferguson writes:
>>
>> > If the temperature is available on your switch, can you not enable SNMP
>&
Duncan Ferguson writes:
> If the temperature is available on your switch, can you not enable SNMP on it
> and read the specific OID to get the info? Far far easier than trying to
> keep an ssh connection open, I think.
>
> I guess this does depend on the switch type and whether the info is ava
SSC_perl writes:
>> On Apr 18, 2017, at 6:19 PM, lee wrote:
>>
>> The purpose is to get room temperature readings
>
> Hey Lee,
>
> I don’t have a solution for you, but I have an idea that might
> help. Have you tried the Misterhouse mailing list?
Hi,
I'm trying to repeatedly execute a command on a remote machine and
to capture the output with a perl program.
I have tried Net::OpenSSH and Net::SSH::Perl. Both log in, execute the
command, capture the output --- and then log out. According to the log
file of the remote machine, Net::OpenS
Shekar writes:
> Hi Lee,
>
> If you can login to your switch via ssh, run required commands on the
> switch and exit out, you should be able to simulate the same via
> Net::OpenSSH or Net::SSH::Perl
Yes, that's what I was thinking. Only it takes time to program, that&
Shlomi Fish writes:
> Hi lee,
>
> On Mon, 04 Jul 2016 04:18:22 +0200
> lee wrote:
>
>> Hi,
>>
>> would it be possible to use something like Net::SSH::Perl to
>> automatically alter the configuration of a switch into which I can log
>> in manuall
Hi,
would it be possible to use something like Net::SSH::Perl to
automatically alter the configuration of a switch into which I can log
in manually via ssh?
I'm looking for a way to automatically switch a network connection
between two others. Since there don't seem to be any switches for this
p
Uri Guttman writes:
> On 05/14/2016 07:11 PM, chace wrote:
>> Can you miss something you weren't aiming at? Thanks for the fun
>> fact, Uri :)
>
> well, he asked about other langs with map like features which was the
> target you aimed at. so missing lisp is worth noting! :)
Somehow I thought li
"Walker, Michael E" writes:
> Hi,
>
> What framework are you all using for database development? When tracking this
> thread back to the original message, I thought, "Nice syntax." I am overall
> new to Perl, but am learning it for ETL at work.
http://dbi.perl.org/
--
To unsubscribe, e-mail:
Uri Guttman writes:
> On 05/12/2016 08:04 PM, lee wrote:
>> ... I appreciate perl for:
>>
>>
>> $dbh->do("INSERT INTO $T_ENTRIES (" .
>> join(', ', map($dbh->quote_identifier($_), $cgi->param)) . ') VALUES
>> (
Unknown User writes:
> I wrote this scrpt to fork off a few child processes, then the child
> processes process some data, and send the data back to the parent
> through a tcp socket.
> This is not working as i expected it would. Why not? How can it be corrected?
>
>
> #!/usr/bin/perl -w
> use st
... I appreciate perl for:
$dbh->do("INSERT INTO $T_ENTRIES (" .
join(', ', map($dbh->quote_identifier($_), $cgi->param)) . ') VALUES
(' .
join(', ', map($dbh->quote($_), map($cgi->param($_), $cgi->param))) .
')')
if(scalar($cgi->param) == 111);
--
To unsubscribe, e-mail:
Nathan Hilterbrand writes:
> On 01/25/2016 05:13 PM, lee wrote:
>> Paul Johnson writes:
>>
>>> On Mon, Jan 25, 2016 at 12:24:04AM +0100, lee wrote:
>>>> Paul Johnson writes:
>>> [...]
>>>> Consider with these examples that an expressi
Kent Fredric writes:
> On 26 January 2016 at 12:02, Nathan Hilterbrand wrote:
>> return wantarray() ? ($a, $b) : [$a, $b];
>>
>> In a list context, you get back a list.. otherwise you get back a reference
>> to a list. Might not be what you want, though.
>>
>> Works with arrays, too..
>>
>> my
Uri Guttman writes:
> On 02/14/2016 01:09 AM, Uri Guttman wrote:
>> On 02/13/2016 02:07 PM, lee wrote:
>>> Brock Wilcox writes:
>>>
>>>> Greetings!
>>>>
>>>> Could you give an example of these warnings, and even better some
>
Chris Knipe writes:
> Hi,
>
> Are there any Cache::* modules that are thread safe and can be used with
> Threading?
>
> Using Cache::Memory (even specifying the same NameSpace), two or more
> threads can't access the same keys in the cache,
>
> Using Cache::File, there are issues with the indexes
"Octavian Rasnita" writes:
> From: "lee"
>
>> "Octavian Rasnita" writes:
>>
>>> From: "lee"
>>>
>>>> Hi,
>>>>
>>>> how can I make it so that my cgi program displays information on
Shlomi Fish writes:
> Hi lee,
>
> On Sat, 13 Feb 2016 14:17:54 +0100
> lee wrote:
>
>> Hi,
>>
>> how can I make it so that my cgi program displays information on a web
>> page it sends to a user's web browser /and/ then makes the browser'
Nathan Hilterbrand writes:
> On 02/13/2016 07:33 AM, lee wrote:
>> Hi,
>>
>> is there a way to disable the annoying warnings about carp and cgi which
>> cgi programs write to the web-server's log file in a general way rather
>> than per program? Same goes
"Octavian Rasnita" writes:
> From: "lee"
>
>> Hi,
>>
>> how can I make it so that my cgi program displays information on a web
>> page it sends to a user's web browser /and/ then makes the browser's
>> download dialog-box come
Brock Wilcox writes:
> Greetings!
>
> Could you give an example of these warnings, and even better some minimal
> code that generates them?
Something like this gives you warnings in apaches error.log:
#!/usr/bin/perl
#
use strict;
use warnings;
use autodie;
use CGI;# q
Hi,
is there a way to disable the annoying warnings about carp and cgi which
cgi programs write to the web-server's log file in a general way rather
than per program? Same goes for smartmatch warnings.
The log file is overloaded with these useless messages, which makes it
difficult to find actua
Hi,
how can I make it so that my cgi program displays information on a web
page it sends to a user's web browser /and/ then makes the browser's
download dialog-box come up to let the user download a file?
It seems that making the web browser wanting to download a file is only
possible by sending
"Chris Charley" writes:
> You could do that in 1 line - See the following small program.
> (The line using a 'grep' solution is commented out. It would work as well).
>
>
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> while (my $id = ) {
>chomp $id;
>#if (grep /itemid=.*?[^\w-]/, spl
Shlomi Fish writes:
> Hi lee,
>
> I should note that it is my impression that you are far too needy in your
> enquiring, and I'm starting to lose patience.
>
> On Mon, 25 Jan 2016 00:11:43 +0100
> lee wrote:
>
>> Shlomi Fish writes:
>>
>> &g
Paul Johnson writes:
> On Mon, Jan 25, 2016 at 12:24:04AM +0100, lee wrote:
>> Paul Johnson writes:
> [...]
>> Consider with these examples that an expression like (1, 3) might
>> unexpectedly evaluate to 3, and you start to think that you don't like
>> thing
Paul Johnson writes:
> On Sun, Jan 24, 2016 at 05:44:14PM +0200, Shlomi Fish wrote:
>> Hi lee,
>>
>> On Sun, 24 Jan 2016 13:11:37 +0100
>> lee wrote:
>>
>> > Paul Johnson writes:
>> > >
>> > > In scalar context the comm
Shlomi Fish writes:
>> >
>> > In scalar context the comma operator evaluates its left-hand side,
>> > throws it away and returns the right-hand side.
>>
>> What is the useful use for this operator?
>>
>
> Well, I believe its use was originally inherited from
> https://en.wikipedia.org/wiki/C_
Paul Johnson writes:
> On Tue, Sep 09, 2014 at 03:12:00PM -0700, Jim Gibson wrote:
>>
>> On Sep 9, 2014, at 2:57 PM, Shawn H Corey wrote:
>>
>> > On Tue, 09 Sep 2014 23:09:52 +0200
>> > lee wrote:
>> >
>> >> my $i = 1;
>>
Hi,
how do I arrange two (text) input fields side by side rather than one
underneath the other?
How do I automatically set the cursor into a particular field when the
form is loaded so that keyboard input is entered into that field without
the user having to select the field manually first?
--
Hi,
how can I extract images and information from another cell in the same
row from a spreadsheet? The spreadsheet is in xls and can be converted
to ods (or other formats Libreoffice supports).
The sheet has over 1000 rows that look like this:
| [image] | irrelevant cell | irrelevant cell | ex
Vincent Lequertier writes:
> Le 2015-04-26 14:27, lee a écrit :
>> Hi,
>>
>> how can I create a libreoffice spreadsheet with perl? There seem to be
>> two modules for it, yet none of them seems to let you do it --- if they
>> do, the documentation doesn
Hi,
how can I create a libreoffice spreadsheet with perl? There seem to be
two modules for it, yet none of them seems to let you do it --- if they
do, the documentation doesn't have any example of how to do it.
The alternative seems to be to write MS excel files, and I don't really
want to resor
Jim Gibson writes:
> On Sep 8, 2014, at 3:13 PM, lee wrote:
>
>> Shawn H Corey writes:
>>
>>> On Mon, 18 Aug 2014 16:17:53 +0800
>>> # or
>>>
>>> sub myfunc {
>>> return [ 1, 2, 3 ];
>>> }
>>
>> Is there a
Shawn H Corey writes:
> On Mon, 18 Aug 2014 16:17:53 +0800
> Ken Peng wrote:
>
>> sub myfunc {
>> my @x=(1,2,3);
>> return \@x;
>> }
>>
>> # or,
>>
>> sub myfunc {
>> my @x=(1,2,3);
>> return [@x];
>> }
>
> # or
>
> sub myfunc {
> return [ 1, 2, 3 ];
> }
Is there a difference to
su
Chris Knipe writes:
> This is an actual example of a communication stream between a client
> and the perl server, the socket is already established, and
> communication is flowing between the two parties. [C] indicates what
> the client is sending to the server, and [S] indicates the responses
>
"Richard Bailey" writes:
> There is code available from my wizard at
> http://www.rtbaileyphd.com/perlwizard that is doing something fairly similar
> to what you described. Use PerlWizard to generate a simple test program,
> run it once, and then examine the contents of the pwiz subirectory, whi
"Danny Wong (dannwong)" writes:
> Hi Perl Gurus,
> What is the best module to use to read incoming emails from a particular
> user? Any examples would be great to! Thanks!
It depends on what you consider "read". There's an example that uses
Net::IMAP
lee writes:
> Hi,
>
> is there a module available to read configuration files which are like
> this:
>
>
> arbitrary_denominator-00 | alternate-denominator-00 |
> alternate-denominator-01 [| ...]
> {
> itemA =
> itemB =
> itemC =
> itemD =
>
Hi,
is there a module available to read configuration files which are like
this:
arbitrary_denominator-00 | alternate-denominator-00 | alternate-denominator-01
[| ...]
{
itemA =
itemB =
itemC =
itemD =
}
as in:
postmas...@example.com
| u...@example.com
{
itemB = 5
itemC = 3.
Hi,
is there some perl module to handle emacs org-mode tables?
--
Debugger entered--Lisp error: (error "No error here")
signal(error ("No error here"))
error("No %s here" "error")
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@per
timothy adigun <2teezp...@gmail.com> writes:
use strict;
use warnings;
sub test {
print $counter . "\n";
}
my $counter = 0;
while($counter < 5) {
test();
$counter++;
}
It says "Global symbol "$counter"
Shlomi Fish writes:
> Hi Lee,
>
> On Wed, 26 Jun 2013 10:18:44 +0200
> lee wrote:
>
>> Hi,
>>
>> the following example doesn't compile:
>>
>>
>> use strict;
>> use warnings;
>>
>>
>> sub test {
>
shawn wilson writes:
> On Jun 25, 2013 3:11 AM, "lee" wrote:
>>
>> shawn wilson writes:
>>
>> > Lee, can you provide an example of another programming language that
>> > implements this or a thesis that describes this problem in more
John SJ Anderson writes:
> Lee, have you read the 'statement modifiers' and 'compound statement'
> portions of 'perldoc perlsyn'? You may find that this clarifies this
> issue for you.
Well yes, I understand that there are two different kinds of
Hi,
the following example doesn't compile:
use strict;
use warnings;
sub test {
print $counter . "\n";
}
my $counter = 0;
while($counter < 5) {
test();
$counter++;
}
It says "Global symbol "$counter" requires explicit package name ...".
When I put the subroutine after the 'whil
Uri Guttman writes:
> On 06/24/2013 08:46 AM, lee wrote:
>> John Delacour writes:
>>>
>>> “Stop if it’s raining, open your umbrella.”
>>>
>>> Nobody would know what you intend to say. No condition is actually
>>> attached to “stop”.
>>
shawn wilson writes:
> Lee, can you provide an example of another programming language that
> implements this or a thesis that describes this problem in more depth?
I'm not sure what you mean --- other programming languages I know don't
have two different kinds of 'if
Shlomi Fish writes:
>> An 'if' is an 'if', and when putting 'last' in front of it changes it to
>> something else, why isn't there a keyword for it like 'lastif'?
>>
>
> How so?
>
> last MYLABEL if $x == 5;
>
> does exactly the same as:
>
> if ($x == 5) {
> last MYLABEL;
> }
>
> Similarly:
"Dr.Ruud" writes:
> On 24/06/2013 07:36, lee wrote:
>
>> It would be like:
>>
>> if ( $color eq "blue" ) {
>>print "test\n";
>>last;
>> }
>
> Alternative:
>
> print( "test\n" ), last
>
John Delacour writes:
> What you are saying is rather like expecting meaning from a sentence
It tells you to stop when it's raining and to open your umbrella.
> like:
>
> “Stop if it’s raining, open your umbrella.”
>
> Nobody would know what you intend to say. No condition is actually
> attach
timothy adigun <2teezp...@gmail.com> writes:
> Hi lee,
> Please, check my comment below:
>
> On Sun, Jun 23, 2013 at 3:43 AM, lee wrote:
>
>> James Alton writes:
>>
>> > lee,
>> >
>> > You have a post statement if and then a code block
Shlomi Fish writes:
> Hi Lee,
>
> On Sun, 23 Jun 2013 04:43:58 +0200
> lee wrote:
>
>> James Alton writes:
>>
>> > lee,
>> >
>> > You have a post statement if and then a code block. You can only use one of
>> > two forms:
>&
James Alton writes:
> lee,
>
> You have a post statement if and then a code block. You can only use one of
> two forms:
>
> print "test" if $color eq "blue"; #no parenthesis required
> if($color eq "blue"){print "test";}
And I can
Hi,
trying to figure out what `last' actually does, I wrote this test
script:
use strict;
use warnings;
use autodie;
my $counter = 0;
while($counter < 8) {
last if($counter > 2) {
print "if: " . $counter . "\n";
}
else {
print "else: " . $counter . "\n";
}
$
Shlomi Fish writes:
>> > But if the size hasn't changed, then you still need to check something
>> > else. You can do another light check, or decide to do the heavy one.
>> >
>> > This is also important because a hash-value is only a fingerprint, so
>> > different files have (a small chance on ha
Jim Gibson writes:
> Some comments on your code:
>
> 1. Rather than doing this:
>
> while ( <$curridx>) { chomp $_; my $current_file = $_;
>
> you should do this:
>
> while ( my $current_file = <$curridx> ) { chomp($current_file);
Ah cool :) I really didn't like the way I did that, this is
Jim Gibson writes:
> On Jun 13, 2013, at 1:30 PM, lee wrote:
>
>> In my application, my estimate is that there will be a set of around
>> 100--150 files. Once a file is closed and reported one last time, it
>> doesn't need to be considered anymore, so the number of
Hi,
so I've done this script now --- my fourth perl script ever --- and
since I'm getting so much help here, I thought I'd post it here. I'm
sure it could be done much better, it's just plain and simple.
It has one problem: The list of closed files can grow indefinitely, and
since the script che
"Dr.Ruud" writes:
> On 12/06/2013 11:33, lee wrote:
>> Jim Gibson writes:
>>> On Jun 11, 2013, at 9:44 PM, lee wrote:
>
>>>> I've been googling for examples of how to create a sha-2 sum of a
>>>> file in perl without success. Wha
"Dr.Ruud" writes:
> On 12/06/2013 10:27, lee wrote:
>
>> File sizes do not reliably indicate whether a file has been modified or
>> not.
>
> If the file size has changed, then your file has changed. That is 100%
> reliable, and is a quick and cheap check.
Jim Gibson writes:
> On Jun 13, 2013, at 10:51 AM, lee wrote:
>> + When I create files with lines like "filename:size:mtime" or
>> "filename:hash", is there something built in to read a syntax like
>> this into, let's say, an array like "my @f
Jim Gibson writes:
> On Jun 13, 2013, at 11:33 AM, lee wrote:
>
>> Shlomi Fish writes:
>>
>>
>>>>>> our $fh;
>>>>>
>>>>> Why the our?
>>>>
>>>> I've been reading that you need to declare v
Shlomi Fish writes:
> Hi Lee,
>
> thanks for replying to the list and for not top posting.
Yvw :) I hate top posting --- only in rare cases, I find it
useful/reasonable. And posting the solution here might help others.
>> >> #!/bin/perl
>> >
>> > Is you
Jim Gibson writes:
> On Jun 12, 2013, at 2:33 AM, lee wrote:
>
>> Jim Gibson writes:
>>
>>>
>>> The first thing to do would be to check the file size. If the file
>>> size has changed, then the file has been modified. So you will want to
>
Shlomi Fish writes:
>> I've been googling for examples of how to create a sha-2 sum of a file
>> in perl without success. What I'm looking for is something like:
>
> In general, you should not Google for Perl information, because Google tends
> to
> find outdated results. Instead, use MetaCPAN
Shlomi Fish writes:
> Hi Lee,
>
> some comments on your code:
>
> On Wed, 12 Jun 2013 11:28:34 +0200
> lee wrote:
>
>> David Christensen writes:
>>
>> > On 06/11/13 21:44, lee wrote:
>> >> ... what I don't understand is what
>&g
James Alton writes:
> What is the reason for checking file hashes once a month? Are you just
> trying to do a basic sys admin task like ensuring system file integrity? No
> sense in reinventing the wheel. Look into tripwire.
> http://www.linuxjournal.com/article/8758
The purpose is to generate m
Pritish Pattanaik writes:
> Hello Lee,
>
> use Digest::MD5 module I believe solve your problem, But you can
> incorporate other Perl modules to achieve your task.
>
> Things I would consider for this task :
>
> 1. Scripts checks on file/directory on every ? seconds
onc
David Christensen writes:
> On 06/11/13 21:44, lee wrote:
>> ... what I don't understand is what
>> the most efficient way would be to create a sha-2 sum for a file.
>
> Have you considered Digest?
>
> http://perldoc.perl.org/Digest.html
Yes, I've been
Jim Gibson writes:
> On Jun 11, 2013, at 9:44 PM, lee wrote:
>> I've been googling for examples of how to create a sha-2 sum of a
>> file in perl without success. What I'm looking for is something
>> like:
>>
>> $hash = create_sha2_sum( $filename);
Hi,
what I'm trying to do is create a list of sha-2 sums of files the names
of which are stored in a file. The purpose is to verify from time to
time whether any of the listed files have been modified or not in the
meantime.
So I can read the list of file names; what I don't understand is what
t
Hey,
I am trying to add an with :
item title>
http://example.com/1
* sam*
Here is perl code:
=8<=
use strict;
use warnings;
use XML::RSS;
my $rss = XML::RSS->new(version => '*2.0*');
$rss->add_module(prefix => 'dc', uri => 'http://purl.org/dc/elements/1.1/');
$rss->channel(title =
Oh, thank you!!
Now I understand, the point is that if don't suppose to give an
argument to function, i should declare it as function() with brackets.
Thanks again!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.pe
when i use binmode in threaded program, i got a segmentation fault;
i comment the binmode line, the program works well
use threads;
use threads::shared;
use utf8;
binmode(STDOUT, ':encoding(utf8)';
---thread create and join-
--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/m
when i use binmode in threaded program, i got a segmentation fault;
i comment the binmode line, the program works well
use threads;
use threads::shared;
use utf8;
binmode(STDOUT, ':encoding(utf8)';
---thread create and join-
--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/m
so it needs to be untainted it before being fed into "use
lib" (or other adjustment to '@INC').
--
: David Lee
: ECMWF (Data Handling System)
: Shinfield Park
: Reading RG2 9AX
: Berkshire
:
: tel:+44-118-9499 362
: email: david@ecmwf.int
--
To unsubscribe, e-mail: begi
1 - 100 of 372 matches
Mail list logo