I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain2.com/tgp/
/home/domains/www.domain3.com/tgp/... (1 Reply)
Hello,
I've moved to a new network with multiple AIX box's. Most of them are working fine and dandy.
On one box I need to set up a static route to a gateway.. no problem right?
Whenever I add the route it appears in the routing table as UGc and then begins adding new entries to the... (1 Reply)
Please read my issue!
My old server using:
- AIX system operating (5300-05-CSP-0000)
- WebSphere 6.1.0.21 (Fix Pack 21)
After I've upgraded version AIX
- AIX system operating (5300-09-02-0849)
- WebSphere 6.1.0.21 (Fix Pack 21)
I have 1 issue when I access home page:
"Error... (0 Replies)
Hello,
I recently installed GIT 1.8.1 on my AIX 6.1 machine referring to AIX Open Source Packages | Main / git website and am facing a few issues with it.
Now if I login as root and issue git commands like git --version I get the response as shown : git version 1.8.1And I have tried creating... (4 Replies)
Hi Experts,
We are developing a script which will wait for the trigger file(with datetime in the trigger file name).
But the problem is when I use 'while' loop to wait for the file, it waits for the filename with wilcard in it that is wait for 'Trigger*.done' file. :eek:
Below is the script
... (4 Replies)
Hi.
I'm trying to install VMWare Workstation to run a virtual machine on my Mac OS, but running the bundle from bash(xterm)
sh VMware-workstation-Full-11.0.0-2305329.x86_64.bundle
(as suggested in install guide)
comes up with error:stat: illegal option -- -
usage: stat
Digging... (5 Replies)
Hi,
If i were to do this an print out the file, it will show as it is in the command
$ awk '/Privilege Use/ {P=0} /Object Access/ {P=1} P' AdvancedAudit.txt
Object Access
File System No Auditing
Registry No Auditing
Kernel... (1 Reply)
I wish to list only files along with the absolute path in a given directory on my AiX 6.1 system.
Below is the best I could do.
ls -p "/app/scripts"/*
This gives a a list of all filename along with folder names with absolute path non-recurrsive (without listing files in sub-directories)... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT DEBIAN
devel::refcount
Devel::Refcount(3pm) User Contributed Perl Documentation Devel::Refcount(3pm)NAME
"Devel::Refcount" - obtain the REFCNT value of a referent
SYNOPSIS
use Devel::Refcount qw( refcount );
my $anon = [];
print "Anon ARRAY $anon has " . refcount($anon) . " reference
";
my $otherref = $anon;
print "Anon ARRAY $anon now has " . refcount($anon) . " references
";
DESCRIPTION
This module provides a single function which obtains the reference count of the object being pointed to by the passed reference value.
FUNCTIONS
$count = refcount($ref)
Returns the reference count of the object being pointed to by $ref.
COMPARISON WITH SvREFCNT
This function differs from "Devel::Peek::SvREFCNT" in that SvREFCNT() gives the reference count of the SV object itself that it is passed,
whereas refcount() gives the count of the object being pointed to. This allows it to give the count of any referent (i.e. ARRAY, HASH,
CODE, GLOB and Regexp types) as well.
Consider the following example program:
use Devel::Peek qw( SvREFCNT );
use Devel::Refcount qw( refcount );
sub printcount
{
my $name = shift;
printf "%30s has SvREFCNT=%d, refcount=%d
",
$name, SvREFCNT($_[0]), refcount($_[0]);
}
my $var = [];
printcount 'Initially, $var', $var;
my $othervar = $var;
printcount 'Before CODE ref, $var', $var;
printcount '$othervar', $othervar;
my $code = sub { undef $var };
printcount 'After CODE ref, $var', $var;
printcount '$othervar', $othervar;
This produces the output
Initially, $var has SvREFCNT=1, refcount=1
Before CODE ref, $var has SvREFCNT=1, refcount=2
$othervar has SvREFCNT=1, refcount=2
After CODE ref, $var has SvREFCNT=2, refcount=2
$othervar has SvREFCNT=1, refcount=2
Here, we see that SvREFCNT() counts the number of references to the SV object passed in as the scalar value - the $var or $othervar
respectively, whereas refcount() counts the number of reference values that point to the referent object - the anonymous ARRAY in this
case.
Before the CODE reference is constructed, both $var and $othervar have SvREFCNT() of 1, as they exist only in the current lexical pad. The
anonymous ARRAY has a refcount() of 2, because both $var and $othervar store a reference to it.
After the CODE reference is constructed, the $var variable now has an SvREFCNT() of 2, because it also appears in the lexical pad for the
new anonymous CODE block.
PURE-PERL FALLBACK
An XS implementation of this function is provided, and is used by default. If the XS library cannot be loaded, a fallback implementation in
pure perl using the "B" module is used instead. This will behave identically, but is much slower.
Rate pp xs
pp 225985/s -- -66%
xs 669570/s 196% --
SEE ALSO
o Test::Refcount - assert reference counts on objects
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2011-11-15 Devel::Refcount(3pm)