Hi folks,
Ubuntu 7.04 server amd64
apache2-2.2.3
postfix-2.3.8
mysql Ver 14.12
SquirrelMail version 1.4.11
I have a running Mail Server. I need to make it as a file server, in addition, allowing users who have accounts (Linux/shell) on the Mail Server to upload/download their files... (1 Reply)
Need help on making a loop script base on what is inside a file...
File to read: List.txt
List.txt contains below w/c are file name as well:
SAMPLEa
SAMPLEb
SAMPLEc
SAMPLEd
SAMPLEe
SAMPLEf
.
.
.
Want to make a loop that will manipulate those that are inside the file.txt w/c are... (3 Replies)
To make it clearer:
I have a file, List.txt
List.txt contains: (these are actually splitted files w/c I got from ls command and dump them to the List.txt file)
SAMPLEa
SAMPLEb
SAMPLEc
SAMPLEd
SAMPLEe
SAMPLEf
.
.
.
.
.
And I want to rename these files to have a .dat extension.... (3 Replies)
hi
i have a cfg file,it contains
lpdma520.dev.ipc.us.aexp.com=SUBMCORE.REQUEST.FT
lpdma521.dev.ipc.us.aexp.com=SUBMCORE.REQUEST.FTREQ
lpdma522.dev.ipc.us.aexp.com=SUBMITSECUREFILEFLOW
i am retrieving the values using the function
RetrieveCfgvalue()
{
CFG_VALUE=`grep "$2="... (1 Reply)
HI
I have input file A.txt
X
Y
Z
File B.txt
1 X 10 AAA 11123
2 Y 22 PlD 4563
3 Z 55 PlD 54645
4 Z 66 PlD 15698
5 F 44 PlD 154798
6 C 55 PlD 12554
7 Z 88 PlD 23265
8 C 99 PlD 151654
9 C 11 PlD 21546546
I need New File C.txt (1 Reply)
Hi,
Anyone can help, I have a large textfile (one file), and I need to split into multiple file to break each file into ^L.
My textfile
==========
abc company
abc address
abc contact
^L
my company
my address
my contact
my skills
^L
your company
your address
========== (3 Replies)
Hi,
I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility?
Thanks,... (6 Replies)
I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 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)