[25364] in Perl-Users-Digest
Perl-Users Digest, Issue: 7609 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 5 18:10:35 2005
Date: Wed, 5 Jan 2005 15:10:25 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 5 Jan 2005 Volume: 10 Number: 7609
Today's topics:
Re: Similair command like 'ls' in perl <joe@inwap.com>
Re: Similair command like 'ls' in perl <xx087@freenet.carleton.ca>
Re: Similair command like 'ls' in perl <abigail@abigail.nl>
specifying use strict <carlton_gregory@yahoo.com>
Re: specifying use strict <mritty@gmail.com>
Re: specifying use strict <uri@stemsystems.com>
Re: specifying use strict <carlton_gregory@yahoo.com>
Re: specifying use strict jkeen_via_google@yahoo.com
Re: specifying use strict <spamtrap@dot-app.org>
Re: specifying use strict <uri@stemsystems.com>
Trouble with returning data from recursive sub <sabio62@yahoo.com>
Re: Trouble with returning data from recursive sub xhoster@gmail.com
What's wrong with this program? <lianjian@caip.rutgers.edu>
Re: What's wrong with this program? <uri@stemsystems.com>
Re: What's wrong with this program? <regner@dievision.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 05 Jan 2005 12:03:35 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Similair command like 'ls' in perl
Message-Id: <ud6dnb4TSNuH1UHcRVn-vw@comcast.com>
Petterson Mikael wrote:
> When I do 'ls' in a shell I get a whole bunch of information including a
> timestamp. Is it possible to get the same information in perl.
Check the docs:
perldoc -f -X
For an example of using stat(), take a look at the output of
find2perl . -ls
For an example of how -M() can be used, try this one-liner:
perl -e '%c=map {-M $_,$_} <* .*>; printf "%8.2f %s\n",$_,$c{$_} for
sort {$a<=>$b} keys %c'
------------------------------
Date: 5 Jan 2005 21:31:16 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: Similair command like 'ls' in perl
Message-Id: <slrncton55.es7.xx087@smeagol.ncf.ca>
At 2005-01-05 03:03PM, Joe Smith <joe@inwap.com> wrote:
> perl -e '%c=map {-M $_,$_} <* .*>; printf "%8.2f %s\n",$_,$c{$_} for sort {$a<=>$b} keys %c'
That may not work as you expect.
Filenames are unique in a directory, but last modified times aren't.
Your %c hash may be missing files.
--
Glenn Jackman
NCF Sysadmin
glennj@ncf.ca
------------------------------
Date: 05 Jan 2005 22:53:39 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Similair command like 'ls' in perl
Message-Id: <slrnctorvj.6in.abigail@alexandra.abigail.nl>
Petterson Mikael (mikael.petterson@ericsson.se) wrote on MMMMCXLV
September MCMXCIII in <URL:news:crgnqr$2o0$1@newstree.wise.edt.ericsson.se>:
)) Hi,
))
)) When I do 'ls' in a shell I get a whole bunch of information including a
)) timestamp. Is it possible to get the same information in perl. Why I
)) need this? I need to find out which directory ( in a directory) that was
)) created last.
How would find out that information using ls? (I assume you're on a
Unix box).
Abigail
--
use lib sub {($\) = split /\./ => pop; print $"};
eval "use Just" || eval "use another" || eval "use Perl" || eval "use Hacker";
------------------------------
Date: 5 Jan 2005 11:23:59 -0800
From: "g3000" <carlton_gregory@yahoo.com>
Subject: specifying use strict
Message-Id: <1104953039.499690.93290@z14g2000cwz.googlegroups.com>
Hello,
I have the following code:
use strict;
use warnings;
use Cwd;
use Math::Random;
our $curr = 'C:\\BackupSamsDB\export\samsdb9877333771';
our $configtime = localtime();
our $ORAHOME = 'C:\oracle\ora81\bin';
our $ORASID = 'SAMSDB';
our $dblocation = 'c:\oracle\oradata\samsdb';
our $backupid = 'samsdb9877333771';
our $lstBackupLoc;
sub getRepository()
{
my $display = shift || 1;
if ( -e 'backupRepository.conf' and $display )
{
open (CONFREP, "< backupRepository.conf");
undef $/;
eval <CONFREP>;
close CONFREP;
for my $bkpID ( keys %rep )
{
print "This is the time: $rep{$bkpID}->{TIMESTAMP}";
$lstBackupLoc = $rep{$bkpID}->{BACKUP_LOCATION};
$ORAHOME = $rep{$bkpID}->{ORAHOME};
$ORASID = $rep{$bkpID}->{ORASID};
$dblocation = $rep{$bkpID}->{DBFILES};
}
} #END IF
else
{
writeToRepository();
}#end else
}#end getRepository
sub writeToRepository()
{
use Data::Dumper;
$Data::Dumper::Purity = 1;
if (!(-e 'backupRepository.conf'))
{
my %rep = ($backupid => {
TIMESTAMP => $configtime,
SERVER => "bc12025",
BACKUP_LOCATION => $curr,
ORAHOME => $ORAHOME,
ORASID => $ORASID,
DBFILES => $dblocation
}
);
open (CONFREP, "> backupRepository.conf");
print CONFREP Data::Dumper->Dump([\%rep], ['*rep']);
close CONFREP;
}#end if
else
{
my $bid = 'samsdb9432164421';
open (CONFREP, "< backupRepository.conf");
undef $/;
eval <CONFREP>;
close CONFREP;
$rep{$bid} = {TIMESTAMP => $configtime,
SERVER => "SAMSDEV",
BACKUP_LOCATION => $curr,
ORAHOME => $ORAHOME,
ORASID => $ORASID,
DBFILES => $dblocation
};
open (CONFREP, "> backupRepository.conf");
print CONFREP Data::Dumper->Dump([\%rep], ['*rep']);
close CONFREP;
}#end if
}#END writeToRepository
getRepository();
which gives me the following:
Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
line 20.
Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
line 22.
Global symbol "$lstBackupLoc" requires explicit package name at
c:\wip\pdb.pl line 24.
Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
line 24.
Global symbol "$bkpID" requires explicit package name at c:\wip\pdb.pl
line 24.
Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
line 25.
Global symbol "$bkpID" requires explicit package name at c:\wip\pdb.pl
line 25.
Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
line 26.
Global symbol "$bkpID" requires explicit package name at c:\wip\pdb.pl
line 26.
Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
line 27.
Global symbol "$bkpID" requires explicit package name at c:\wip\pdb.pl
line 27.
BEGIN not safe after errors--compilation aborted at c:\wip\pdb.pl line
36.
why is it when I comment out use strict I dont get the above errors?
If it is in a doc somewhere can u post the link so I can read for
myself?
Thank you.
------------------------------
Date: Wed, 05 Jan 2005 19:28:01 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: specifying use strict
Message-Id: <5dXCd.20453$He3.6013@trndny05>
"g3000" <carlton_gregory@yahoo.com> wrote in message
news:1104953039.499690.93290@z14g2000cwz.googlegroups.com...
> Hello,
> I have the following code:
<code snipped>
> which gives me the following:
<strict vars errors snipped>
> why is it when I comment out use strict I dont get the above errors?
>
> If it is in a doc somewhere can u post the link so I can read for
> myself?
Have you read the documentation for strict itself?
type:
perldoc strict
from your command line. Look at the section labeled "strict vars"
Paul Lalli
------------------------------
Date: Wed, 05 Jan 2005 20:21:19 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: specifying use strict
Message-Id: <x7u0pvmxts.fsf@mail.sysarch.com>
>>>>> "g" == g3000 <carlton_gregory@yahoo.com> writes:
g> use strict;
g> use warnings;
g> use Cwd;
g> use Math::Random;
g> our $curr = 'C:\\BackupSamsDB\export\samsdb9877333771';
g> our $configtime = localtime();
g> our $ORAHOME = 'C:\oracle\ora81\bin';
g> our $ORASID = 'SAMSDB';
g> our $dblocation = 'c:\oracle\oradata\samsdb';
g> our $backupid = 'samsdb9877333771';
g> our $lstBackupLoc;
why are those package globals (which is what our declares)? use my.
g> sub getRepository()
why the ()? do you know what that does and why it is not usually wanted
nor needed?
g> {
g> my $display = shift || 1;
g> if ( -e 'backupRepository.conf' and $display )
g> {
g> open (CONFREP, "< backupRepository.conf");
always handle failures from open.
g> undef $/;
that is going to affect all other file handles. localize it. better yet
use File::Slurp from cpan
g> eval <CONFREP>;
g> close CONFREP;
g> for my $bkpID ( keys %rep )
g> {
g> print "This is the time: $rep{$bkpID}->{TIMESTAMP}";
g> $lstBackupLoc = $rep{$bkpID}->{BACKUP_LOCATION};
g> $ORAHOME = $rep{$bkpID}->{ORAHOME};
g> $ORASID = $rep{$bkpID}->{ORASID};
g> $dblocation = $rep{$bkpID}->{DBFILES};
fix your indenting. or if it is ok, use a better newsreader that doesn't
screw up white space.
g> }
g> if (!(-e 'backupRepository.conf'))
unless is better there.
g> {
g> }#end if
with clean indenting, it is rare that you need to mark end of block
g> else
g> {
g> my $bid = 'samsdb9432164421';
g> open (CONFREP, "< backupRepository.conf");
g> undef $/;
remember the time before when you did that? it is still undef. again,
File::Slurp is cleaner and faster and safer.
and you should factor out this load config stuff to a sub or use one of
the many config modules on cpan.
g> getRepository();
g> which gives me the following:
g> Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
g> line 20.
g> Global symbol "%rep" requires explicit package name at c:\wip\pdb.pl
g> line 22.
you never declare %rep but you use it as $rep{foo}.
g> why is it when I comment out use strict I dont get the above errors?
because that is what strict is for. it forces you to properly declare
all variables before you use them.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 5 Jan 2005 13:23:00 -0800
From: "g3000" <carlton_gregory@yahoo.com>
Subject: Re: specifying use strict
Message-Id: <1104960180.668266.92100@c13g2000cwb.googlegroups.com>
Thanks all for the reply.
Uri,
I thought that when I opened the file with my hash in it using
eval <'my file handle here'>
that it would bring %rep "into" my code?
Obviously that is not doing that.
Should I give my config file a package name in the begining?
Like
package restoreconfig;
%rep = ( blah, ........);
Other responses........
No I dont know what the '()' does after the
subroutine name
guess I should research it.
I would look at File::Slurp why is it better and
cleaner?
I will change if ( ! (-e 'backupRepository.conf') )
to unless
I dont know what a newsreader is ( dont think I used
one )
I use our because some of those scalars I need to be
global to
the package not to the subroutines.
The code I posted here is just to test it out, it (
the two subs ) will
be used in another script where I want to be able to
know what
certain variables are at anytime during the program.
I changed them from my to our to make sure I could
see them.
As obvious I am a novice Perl user but outside my
power I had
to teach myself Perl under time constraints.
Need to find a good Perl book for after hours and
learn more
details instead of winging it.
Thanks again for your time and comments.
------------------------------
Date: 5 Jan 2005 13:45:46 -0800
From: jkeen_via_google@yahoo.com
Subject: Re: specifying use strict
Message-Id: <1104961546.671941.111510@f14g2000cwb.googlegroups.com>
g3000 wrote:
> Thanks all for the reply.
>
>
> As obvious I am a novice Perl user but outside my
> power I had
> to teach myself Perl under time constraints.
> Need to find a good Perl book for after hours and
> learn more
> details instead of winging it.
1. Many of us are originally self-taught in Perl, so no problem there.
2. Purchase and work through "Learning Perl," 3rd ed., Randal L
Schwartz & Tom Phoenix (O'Reilly) -- or other Perl books recommended
here: http://learn.perl.org.
3. Acquaint yourself with the posting guidelines for
comp.lang.perl.misc. They are regularly posted on this list and are
also available at
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html.
Following the guidelines therein will (a) win you respect on this list
for doing so; and (b) help train you to diagnose your Perl problems
prior to posting.
4. Also, there are a number of good mailing lists for Perl beginners,
including http://groups.yahoo.com/group/perl-beginner/ and the
beginners list at learn.perl.org.
------------------------------
Date: Wed, 05 Jan 2005 17:00:31 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: specifying use strict
Message-Id: <ApGdnRpe27Id_kHcRVn-hQ@adelphia.com>
g3000 wrote:
> No I dont know what the '()' does after the
> subroutine name
> guess I should research it.
Have a look at "perldoc perlsub" - especially the section about prototypes.
> I dont know what a newsreader is ( dont think I used
> one )
You know about "regular" email apps like Outlook Express or Eudora,
right? And how some services like Hotmail provide a web-based interface
to their email service?
The same thing is true of news groups. Google groups is just a web-based
interface to Usenet - and not a very good one at that. It's gotten worse
recently, mangling spacing in posts - that might be where your indenting
went. Google groups is really useful for searching the archives; it's
much less so for posting new messages.
Check your provider's support pages for info about Usetnet or NNTP
access. There are a variety of news readers you can use - OE, Mozilla,
Thunderbird, Emacs, Agent, PAN, etc. You could even write your own with
Net::NNTP if you felt like it.
> Need to find a good Perl book
Have a look at <http://learn.perl.org> for recommendations regarding
books and online material.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: Wed, 05 Jan 2005 22:15:44 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: specifying use strict
Message-Id: <x71xczmsja.fsf@mail.sysarch.com>
>>>>> "g" == g3000 <carlton_gregory@yahoo.com> writes:
g> Thanks all for the reply.
g> Uri,
g> I thought that when I opened the file with my hash in it using
g> eval <'my file handle here'>
i would read it into a scalar and eval it. that way you can print out
what you read for debugging. but as i said you are doing work you don't
have to do. search cpan for config modules. and if you must roll your
own, isolate it into a sub so you can debug it. do it step by step. open
the file (and handle failures), slurp it in. eval it. return the structure.
g> Other responses........
g> No I dont know what the '()' does after the
g> subroutine name
g> guess I should research it.
yep.
g> I would look at File::Slurp why is it better and
g> cleaner?
because it is faster, cleaner, safer. that is why i wrote it.
g> I dont know what a newsreader is ( dont think I used
g> one )
then how did you post here? your header say you are using google groups
which is your newsreader (web based).
g> I use our because some of those scalars I need to be
g> global to
g> the package not to the subroutines.
that makes little sense. first, you should be passing those values as
args instead of package globals. second, if they must be outside subs,
they should be my which will make the file scoped and not global.
g> The code I posted here is just to test it out, it (
g> the two subs ) will
g> be used in another script where I want to be able to
g> know what
g> certain variables are at anytime during the program.
g> I changed them from my to our to make sure I could
g> see them.
my allows that but it is bad style to use more globalness than you
need.
g> As obvious I am a novice Perl user but outside my
g> power I had
g> to teach myself Perl under time constraints.
g> Need to find a good Perl book for after hours and
g> learn more
g> details instead of winging it.
learn.perl.org is your friend. there is a free decent book on that
site. you can't code stuff like this without knowing some
basics. otherwise you are just cutting and pasting and guessing.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 5 Jan 2005 12:30:15 -0800
From: "sabio62" <sabio62@yahoo.com>
Subject: Trouble with returning data from recursive sub
Message-Id: <1104957015.006464.64630@z14g2000cwz.googlegroups.com>
G'Day,
I've got some trouble with not being able to access the data being
returned from a sub; the sub in question is supposed to return a
reference to an array of Multinode::Tree::Handle objects.
The problem is evident inside the sub itself. The sub contains a
recursive sub which in turn is updating an array beloning to the main
sub ...
I'd greatly appreciate if you can take a look at it and let me know
what to do get the handles properly ...
You may access the source code from this link:
http://www.geocities.com/sabio62/perl/build_categories_tree_with_a_hash_as_values_01.pl.txt
Some background on what I'm trying to do ...
I'm trying to build a tree that may have nodes with repeated keys in
it. For a particular key, I would like to be able to graft children
to the tree at all instances of that key.
For this purpose I've got a sub called add_children_to_str_key
that takes as parameters the string key, a hash containing the
children data to be inserted into the tree for the nodes matching the
string key, a tree object, and an optional handle to the tree, which
if given, we may start the search at that particular handle, otherwise
we start from the top of the tree.
Now, this sub add_children_to_str_key calls a recursive sub named
get_handles_on_string_key which is supposed to search the tree for all
keys that match the string key and return a reference to an array of
tree handles, which is done by matching the current handle's key,
creating a new handle, assigning it to the current handle and pushing
it onto the @found_handles, which is to be returned upon completion of
the recursion ...
Now, the problem that I'm getting is that I'm unable to get the
key/value pair from elements of the array of Tree::MultiNode::Handle's
once the recursive function has completed. The handles are there, and
they match exactly what I see inside the recursive search, but the
values upon completion via get_key, get_value or get_data, just aren't
there ... essentially 'undefined'. However, inside the recursive sub
(preorder_traverse_str_key_search) when I get a match for the key an
create a new handle and assign it it to the current handle the
key/value pairs are there ...
I take it that this has _nothing_ to do with MultiNode.pm per se, and
is more likely to be how I'm coding this stuff.
Any ideas greatly appreciated.
TIA,
Cheers, Sabio
------------------------------
Date: 05 Jan 2005 22:29:43 GMT
From: xhoster@gmail.com
Subject: Re: Trouble with returning data from recursive sub
Message-Id: <20050105172943.920$TZ@newsreader.com>
"sabio62" <sabio62@yahoo.com> wrote:
> G'Day,
>
> I've got some trouble with not being able to access the data being
> returned from a sub; the sub in question is supposed to return a
> reference to an array of Multinode::Tree::Handle objects.
> The problem is evident inside the sub itself.
Well, not to me it isn't. You should rip out all the stuff that you know
is not relevant to the problem, as that is just too much cruft to expect
a stranger to wade through. (And in the process of doing that, you will
probably solve the problem ourself.)
> The sub contains a
> recursive sub which in turn is updating an array beloning to the main
> sub ...
I don't see any recursion going on in your code. add_children seems
to call get_handles but not itself; and get_handles doesn't seem to call
either itself or add_children.
>
> I'd greatly appreciate if you can take a look at it and let me know
> what to do get the handles properly ...
>
> You may access the source code from this link:
>
> http://www.geocities.com/sabio62/perl/build_categories_tree_with_a_hash_a
> s_values_01.pl.txt
Well, I find this part pretty befuddling:
my$found_handle=new Tree::MultiNode::Handle($tree);
#bless $found_handle,"Tree::MultiNode";
$found_handle=$handle;
What is the point to make a new Tree::MultiNode::Handle only to throw it
away?
> Now, the problem that I'm getting is that I'm unable to get the
> key/value pair from elements of the array of Tree::MultiNode::Handle's
> once the recursive function has completed. The handles are there, and
> they match exactly what I see inside the recursive search,
How do you know they match exactly what you see inside the recursive
search? And what do you mean by "handles" matching exactly? That their
reference values stringify to the same thing?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 5 Jan 2005 12:29:45 -0800
From: "Leon" <lianjian@caip.rutgers.edu>
Subject: What's wrong with this program?
Message-Id: <1104956985.826738.61850@z14g2000cwz.googlegroups.com>
#!/usr/bin/perl
use File::Find;
find(\&d, @ARGV);
sub d{
my $file=$File::Find::name;
$file =~ tr/A-Z/a-z/g;
print $file, "\n";
}
The error message is:
Bareword found where operator expected at re.sh line 7, near
"tr/A-Z/a-z/g"
syntax error at re.sh line 7, near "tr/A-Z/a-z/g"
Execution of re.sh aborted due to compilation errors.
What's wrong with this program?
Thanks a lot.
------------------------------
Date: Wed, 05 Jan 2005 20:34:40 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: What's wrong with this program?
Message-Id: <x7hdlvmx7o.fsf@mail.sysarch.com>
>>>>> "L" == Leon <lianjian@caip.rutgers.edu> writes:
L> #!/usr/bin/perl
L> use File::Find;
L> find(\&d, @ARGV);
L> sub d{
L> my $file=$File::Find::name;
L> $file =~ tr/A-Z/a-z/g;
^
L> print $file, "\n";
L> }
L> The error message is:
L> Bareword found where operator expected at re.sh line 7, near
L> "tr/A-Z/a-z/g"
L> syntax error at re.sh line 7, near "tr/A-Z/a-z/g"
tr IS NOT a regex nor is it s///. it has its own modifiers.
perldoc -f tr
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Wed, 05 Jan 2005 21:42:33 +0100
From: Tom Regner <regner@dievision.de>
Subject: Re: What's wrong with this program?
Message-Id: <41dc50d6$0$30193$4d3ebbfe@news1.pop-hannover.net>
Leon wrote:
> #!/usr/bin/perl
> use File::Find;
>
> find(\&d, @ARGV);
> sub d{
> my $file=$File::Find::name;
> $file =~ tr/A-Z/a-z/g;
> print $file, "\n";
> }
>
read perldoc perlop again, and then take out the not existing g modifier :)
regards,
tom
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 7609
***************************************