Hi,
my ( $rc2, $backupsizetrans ) =
rexec(
$backuphost,
'du -k '
. $backupdir\/$backdir2
. ' |tail -1 |awk \'{ print $1 }\''
);
to get the size of
HACKER Nora nora.hac...@stgkk.at asked:
Unfortunately, this does not explain the difference between the local
du and the one via rexec on a remote machine. Any help appreciated.
When you're getting different results then you're doing something differently
;-)
For one thing, you're using just
Hi Paul,
a few comments on your code - so you'll know how to write Perl better.
On Wednesday 05 May 2010 02:52:03 Paul Fontenot wrote:
Hi,
I'm stuck on using an array to determine the out come of a foreach loop.
The script is below.
Hi Thomas,
For one thing, you're using just du to call the binary, so we can't
be sure you're calling the same du in each case. So, when logged in
on the remote machine, do which du and use the resulting fully
qualified path in your rexec call.
Check, this is ok - locally an remotely
I have used libpcap to capture data using Net::Pcap module ... and now
... i have been stuck with decoding... here is the code that i have
used http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/eg/pcapdump
#!/usr/bin/perl use strict; use Data::Hexdumper; use File::Basename;
use Getopt::Long
please paste your code properly. this was wrapped to hell and back by
something you did. it even looked like it was quoted from another
email. make sure you do a clean cut/paste of your code in posts to this
list.
uri
--
Uri Guttman -- u...@stemsystems.com
perl perlatw...@gmail.com asked:
I have used libpcap to capture data using Net::Pcap module
[...]
This is an UDP DNS Query How can i Decode them ... Any one Please
help me
http://www.net-dns.org/docs/Net/DNS/Packet.html
HTH,
Thomas
--
To unsubscribe, e-mail:
foreach $line (LOGFILE) {
while (my $line = $logfile) would be a better idea than foreach $line.
Just curious for an explanation to this. I tend to use foreach too. Don't they
both accomplish the same thing? :)
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For
Brian fulls...@me.com asked:
foreach $line (LOGFILE) {
while (my $line = $logfile) would be a better idea than
foreach $line.
Just curious for an explanation to this. I tend to use foreach too.
Don't they both accomplish the same thing? :)
foreach (LOGFILE) means that the
Brian wrote:
foreach $line (LOGFILE) {
while (my $line = $logfile) would be a better idea than foreach $line.
Just curious for an explanation to this. I tend to use foreach too. Don't they
both accomplish the same thing? :)
Yes, but they go about it in different ways. The
Thomas Bätzler wrote:
Brian fulls...@me.com asked:
foreach $line (LOGFILE) {
while (my $line = $logfile) would be a better idea than
foreach $line.
Just curious for an explanation to this. I tend to use foreach too.
Don't they both accomplish the same thing? :)
foreach (LOGFILE)
Uri Guttman u...@stemsystems.com writes:
HP The output from the script below:
HP Shows 6 elements arrive in dispt($g, @ar) as @_. But when sub N(@_)
HP is called, no variables arrive there. @_ is empty. When it seems like
HP 5 elements should have arrived there
well, it helps if
On Fri, Apr 30, 2010 at 10:40 PM, C.DeRykus dery...@gmail.com wrote:
On Apr 30, 3:55 am, learn.tech...@gmail.com (Amit Saxena) wrote:
Hello everybody,
Can we perform substitution to the matched pattern inside a regular
expression so that the modified pattern gets returned instead of
On Wednesday 05 May 2010, Shlomi Fish wrote:
2. Don't use bareword filehandles - use lexical ones:
open(my $output, , $output) or die Could not append to output - $!;
Wouldn't there be any issues if we use same name for lexical filehandle and the
scalar variable. Is Perl too intelligent to
Harry Putnam rea...@newsguy.com asked:
[...]
which is also inside sub dispt {the sub function}. Where does global
come in?
Hint: $code-(@_);
HTH,
Thomas
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 5 May 2010 14:36, Harry Putnam rea...@newsguy.com wrote:
Uri Guttman u...@stemsystems.com writes:
HP The output from the script below:
HP Shows 6 elements arrive in dispt($g, @ar) as @_. But when sub N(@_)
HP is called, no variables arrive there. @_ is empty. When it seems like
On 5 May 2010 15:26, Thomas Bätzler t.baetz...@bringe.com wrote:
Harry Putnam rea...@newsguy.com asked:
[...]
which is also inside sub dispt {the sub function}. Where does global
come in?
Hint: $code-(@_);
Or indeed $code; if you want to be cryptic :)
Phil
--
To unsubscribe, e-mail:
On Wednesday 05 May 2010 17:20:25 Akhthar Parvez K wrote:
On Wednesday 05 May 2010, Shlomi Fish wrote:
2. Don't use bareword filehandles - use lexical ones:
open(my $output, , $output) or die Could not append to output - $!;
Wouldn't there be any issues if we use same name for lexical
Hi,
I'm new to perl but very enthusiastic about it. I'm having an issue
with the following code.
The task:
two arrays one with a key key and one with responses from a form
responses. The idea is that each value in the responses array will
be compared to key; if the values match then a 1 or a 0
On Wednesday 05 May 2010, Shlomi Fish wrote:
Wouldn't there be any issues if we use same name for lexical filehandle and
the scalar variable. Is Perl too intelligent to recognize both of them?
There certainly would be, and I don't think Perl is that intelligent to
multiplex between the
On Wednesday 05 May 2010, Shawn H Corey wrote:
Brian wrote:
foreach $line (LOGFILE) {
while (my $line = $logfile) would be a better idea than foreach $line.
Just curious for an explanation to this. I tend to use foreach too. Don't
they both accomplish the same thing? :)
On Wed, May 5, 2010 at 10:18 AM, Shlomi Fish shlo...@iglu.org.il wrote:
Hi Paul,
a few comments on your code - so you'll know how to write Perl better.
On Wednesday 05 May 2010 02:52:03 Paul Fontenot wrote:
Hi,
I'm stuck on using an array to determine the out come of a foreach loop.
Philip Potter philip.g.pot...@gmail.com writes:
On 5 May 2010 14:36, Harry Putnam rea...@newsguy.com wrote:
Uri Guttman u...@stemsystems.com writes:
HP The output from the script below:
HP Shows 6 elements arrive in dispt($g, @ar) as @_. But when sub N(@_)
HP is called, no variables
Thomas Bätzler t.baetz...@bringe.com writes:
Harry Putnam rea...@newsguy.com asked:
[...]
which is also inside sub dispt {the sub function}. Where does global
come in?
Hint: $code-(@_);
Yes, I knew it could be done there... but what to do then when more
function calls are added.
Are you
Akhthar Parvez K wrote:
On Wednesday 05 May 2010, Shawn H Corey wrote:
Brian wrote:
foreach $line (LOGFILE) {
while (my $line = $logfile) would be a better idea than foreach $line.
Just curious for an explanation to this. I tend to use foreach too.
Don't they both accomplish the
On 5 May 2010 17:29, Harry Putnam rea...@newsguy.com wrote:
Anyway, I understood he was saying NOT global.
What I asked is why that would matter. That is, the values or
elements in @_ arrive inside the `sub dispt {...}', so should be
available to anything inside `sub dispt {...}' right?
On Tue, May 4, 2010 at 8:39 PM, iinfer tbon...@gmail.com wrote:
# OPEN THE KEY
my @key=();
my @score_key=();
sub key{
my $inFile = 'key.csv';
open(IN, $inFile) or die open $inFile: $!;
@key=split(',',IN);
@score_key=shift(@key);
return @key;
}
Is it possible that the
Uri Guttman u...@stemsystems.com writes:
HP == Harry Putnam rea...@newsguy.com writes:
HP A third sub function is called in the dispatch table ( N(@_); ) but
HP the variables don't survive to be use there.
there are no variables to survive in a sub, just passed arguments in @_
HP
On Wednesday 05 May 2010, Rob Coops wrote:
Would it not be more efficient to reset the file handle to the star of the
file?
use strict;
use warnings;
use Fcntl qw(:seek);
...
foreach my $condition (@conditions) {
seek ( $fh, 0, 0 ) or die ERROR: Could not reset file handle\n;
while
iinfer wrote:
Hi,
Hello,
I'm new to perl but very enthusiastic about it. I'm having an issue
with the following code.
The task:
two arrays one with a key key and one with responses from a form
responses. The idea is that each value in the responses array will
be compared to key; if the
On Wed, May 5, 2010 at 7:21 PM, Akhthar Parvez K
akht...@sysadminguide.comwrote:
On Wednesday 05 May 2010, Rob Coops wrote:
Would it not be more efficient to reset the file handle to the star of
the
file?
use strict;
use warnings;
use Fcntl qw(:seek);
...
foreach my $condition
On Wednesday 05 May 2010, Rob Coops wrote:
A file never starts life being huge but certainly logs tend to grow, and
they are not always kept in check properly so assume they will be massive
(I've seen flat text logs that grew by as much as +1GB per day) assuming
that the file will always be
On Wed, May 5, 2010 at 8:50 PM, Akhthar Parvez K
akht...@sysadminguide.comwrote:
On Wednesday 05 May 2010, Rob Coops wrote:
A file never starts life being huge but certainly logs tend to grow, and
they are not always kept in check properly so assume they will be massive
(I've seen flat
On Wednesday 05 May 2010, John W. Krahn wrote:
If I could explain this further for Perl beginners:
With that foreach statement, it reads the file first and creates an
array with each line as elements and that array is being looped so the
overhead is higher, whereas with that while
APK == Akhthar Parvez K akht...@sysadminguide.com writes:
APK Thanks for the explanation John. Could you give one or two real
APK time examples where you used a list (instead of an array) except
APK in loops such as: for ('a', 'b', 'c', 'd')? I wonder if I'm
APK underusing lists in my
On Thursday 06 May 2010, Rob Coops wrote:
Of course and a system like nagios does exactly that, it reports errors and
positives, mail is of course not the way right to deal with monitoring
certainly in large environments it is simply not done via mail. Currently
looking at the monitoring
Shlomi == Shlomi Fish shlo...@iglu.org.il writes:
Shlomi Why do you need a version with a function that is specifically
Shlomi called doors? What will this doors function do? Generally
Shlomi functions and methods should be called according to verbs and
Shlomi actions - not according to nouns.
On 5/5/10 6:12 PM, in article 861vdqhuat@red.stonehenge.com, Randal L.
Schwartz mer...@stonehenge.com wrote:
Shlomi == Shlomi Fish shlo...@iglu.org.il writes:
Shlomi Why do you need a version with a function that is specifically
Shlomi called doors? What will this doors function do?
38 matches
Mail list logo