[25606] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7850 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 3 18:05:52 2005

Date: Thu, 3 Mar 2005 15:05:26 -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           Thu, 3 Mar 2005     Volume: 10 Number: 7850

Today's topics:
        求 : XDA mini 原廠中文機 換 XDA O2 IIs Wireless 英文機  o2xchange@xda.com
    Re: @_  uninitialized value <someone@example.com>
    Re: @_ uninitialized value mbosogrp@gmail.com
    Re: Cloning structures containing weak references <regner@dievision.de>
    Re: combining two arrays <mritty@gmail.com>
        disagree with a few things in perlsec el_roachmeister@yahoo.com
    Re: disagree with a few things in perlsec <1usa@llenroc.ude.invalid>
    Re: disagree with a few things in perlsec xhoster@gmail.com
    Re: disagree with a few things in perlsec el_roachmeister@yahoo.com
        How to specify [regex] beginning of line/unlimited char <ljames@apollo3.com>
    Re: How to specify [regex] beginning of line/unlimited  <jkeen_via_google@yahoo.com>
    Re: How to tell if the filesystem is RO? (Anno Siegel)
    Re: Importing records with both space and quoted text q <ljames@apollo3.com>
    Re: Importing records with both space and quoted text q <ljames@apollo3.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 3 Mar 2005 18:15:36 +0000 (UTC)
From: o2xchange@xda.com
Subject: 求 : XDA mini 原廠中文機 換 XDA O2 IIs Wireless 英文機  ..................................
Message-Id: <d07k87$2kl5$34@news.hgc.com.hk>

本人現有一部全新 O2 XDA IIs, 2004年11月中出廠, 行貨原廠有保養, 現尋找有興趣用 O2 Mini 中文機連記憶卡跟我換, 請電郵聯絡我 email : moonye417@hotmail.com

原因:這機是朋友送我的生日禮物,我沒要用到 Wireless 及不喜用英文機,但很喜歡 O2 Mini,所以如您有興趣請盡快跟我聯絡.. ^^

不要英文機改Rom的那種...................................


------------------------------

Date: Thu, 03 Mar 2005 21:51:52 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: @_  uninitialized value
Message-Id: <YFLVd.23485$LN5.15574@edtnps90>

mbosogrp@gmail.com wrote:
> I'm writing a small Gtk2 program to convert between bases. I'm getting
> a strange error when i run my code:
> 
> Use of uninitialized value in exponentiation (**) at ./radix line 216.
> Use of uninitialized value in exponentiation (**) at ./radix line 190.
> 
> The strange thing is, sometimes I get it, sometimes I don't. Anyone
> have any insight into what's causing it?

Yes, you are using an overly complex algorithm to do something that Perl
provides a function to do for you.


> Second question. How do you append text to a textbuffer without
> overwriting it?

Use the concatenation operator:

perldoc perlop


> Also, while I'm here, I wouldn't mind some constructive criticism on my
> coding style. Any input would be appreciated.
> 
> Here is the offending code.
> 
> #!/usr/bin/perl -w
> 
> use strict;
> 
> [snip]
> 
> #-------------Main Conversion Routine-------------#
> sub input_callback{
> my $dec = $entry->get_text();
> my $virgin = $dec;
> my @binary;
> 
> if ($dec==0){
>         unshift @binary,0;
> 
> }
> else{
> while ($dec >= 1 ){
> 
> if ($dec==0){
>         unshift @binary,0;
>         last;
> }
> if ($dec==1){
>         unshift @binary,1;
>         $dec = $dec / 2;
>         last;
> }
> if ($dec % 2){
>         unshift @binary, 1;
>         $dec = $dec / 2;
> }
> else{
>         unshift @binary, 0;
>         $dec = $dec / 2;
> }
> 
> 
> }#while
> }#top else
> $radixFrameHash{'Binary:'}->set_text("@binary");
> $radixFrameHash{'Decimal:'}->set_text("$virgin");
> $radixFrameHash{'Octal:'}->set_text(&bin2oct(@binary));
> $radixFrameHash{'Hex:'}->set_text(&bin2hex(@binary));
> $radixFrameHash{'ASCII:'}->set_text(chr $virgin);
> #$text_view->set_buffer ("converting decimal number to binary");
> 
> }#input callback
> #-------------Main Conversion Routine-------------#


#-------------Main Conversion Routine-------------#
sub input_callback{
     my $dec = $entry->get_text();

     $radixFrameHash{'Binary:'}->set_text( sprintf '%#b', $dec );
     $radixFrameHash{'Decimal:'}->set_text( $dec );
     $radixFrameHash{'Octal:'}->set_text( sprintf '%#o', $dec );
     $radixFrameHash{'Hex:'}->set_text( sprintf '%#x', $dec );
     $radixFrameHash{'ASCII:'}->set_text( chr $dec );
     #$text_view->set_buffer ("converting decimal number to binary");
     }
#-------------Main Conversion Routine-------------#


perldoc -f sprintf



John
-- 
use Perl;
program
fulfillment


------------------------------

Date: 3 Mar 2005 09:30:19 -0800
From: mbosogrp@gmail.com
Subject: Re: @_ uninitialized value
Message-Id: <1109871019.115544.281090@f14g2000cwb.googlegroups.com>

Thank you for the reply. You've been extremely helpful. That link will
come in very handy. Up till now I've been using painfully incomplete
perl gtk2 documentation. It left a lot to be desired. That link is a
breath of fresh air.  

Thanks again,
Mboso



------------------------------

Date: Thu, 03 Mar 2005 15:09:10 +0100
From: Tom Regner <regner@dievision.de>
Subject: Re: Cloning structures containing weak references
Message-Id: <422719fa$0$15582$4d3ebbfe@news1.pop-hannover.net>

Mintcake wrote:

> I've tried various cloning modules to clone a structure containing weak
> references.
> 
> use Storable 'dclone';
> use Scalar::Util qw(weaken isweak);
> my $x = 99;
> my $y = [ \$x ] ;
> weaken $y->[0];
> $z = dclone $y;
> print "y: ", isweak $y->[0];
> print "z: ", isweak $z->[0];
> 
> This prints:
> 
> y: 1
> z:
> 
> I've tried it using the Clone module and Clone::PP.  Clone::PP does the
> same as Storable.  Clone gives a segmentation fault.
> 
> I'm using Perl 5.8.0 on Linux 2.4.20-8

After a little bit of thought I'd say that's normal, to be expected
behaviour:

You're not cloning the weakend reference, but the the data it references,
the reference in z[0], poiting to the clone of $x, is a completly new one,
the data is cloned, not the reference.

I may misunderstand the behaviour though...hmmm

kind regards,
Tom

-- 
Dievision GmbH | Kriegerstrasse 44 | 30161 Hannover
Telefon: (0511) 288791-0 | Telefax: (0511) 288791-99
http://www.dievision.de


------------------------------

Date: Thu, 03 Mar 2005 18:17:56 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: combining two arrays
Message-Id: <oxIVd.59131$sR5.15181@trndny05>

"tgiles" <tgiles@gmail.com> wrote in message
news:1109808789.281137.154640@z14g2000cwz.googlegroups.com...
> Forgot to take the time to update this. Please forgive me.
>
> Looks like Mr. Gibson struck gold. Was able to use the code snippet to
> finish up my little script and it runs like a dream. Mr. Lalli, that
> looks pretty intriguing as well. I might plug it in and see where it
> gets me. I appreciate your input as well!

I appreciate your appreciation.  I would appreciate it far more if you
would quote some context in your post that tells me what the heck you're
appreciating.

Have you read the Posting Guidelines that are sent to this group twice a
week?

Glad to be of service, whatever it was.

Paul Lalli



------------------------------

Date: 3 Mar 2005 12:36:14 -0800
From: el_roachmeister@yahoo.com
Subject: disagree with a few things in perlsec
Message-Id: <1109882174.262420.288990@g14g2000cwa.googlegroups.com>

I disagree with a few things in perlsec relating to "Protecting your
program", namely these two paragraphs:

First of all, however, you can't take away read permission, because the
source code has to be readable in order to be compiled and interpreted.
(That doesn't mean that a CGI script's source is readable by people on
the web, though.) So you have to leave the permissions at the socially
friendly 0755 level. This lets people on your local system only see
your source.

Some people mistakenly regard this as a security problem. If your
program does insecure things, and relies on people not knowing how to
exploit those insecurities, it is not secure. It is often possible for
someone to determine the insecure things and exploit them without
viewing the source. Security through obscurity, the name for hiding
your bugs instead of fixing them, is little security indeed.
=======================================

If you are concerned about security you why are you going to let people
on your local system see your source? The default should be 700. You
would only need 755 if you have a definite need to do so.

Security is not a black and white issue. No script on this planet is
100% secure. It is all about reducing your probablity of being hacked.
Anything you do to make it more difficult for a script to be hacked
will increase the "security" of the script. Even if you write the
"perfectly secure" script, there are other ways into your program
beside your script. A hacker could just decide to break into your web
hosting account directly.

Security by obscurity is very helpful in reducing your risks. The
perlsec makes it sounds like it has no effect on protecting it. I
suggest perslec either eliminate any comments about security by
obscurity since that really has nothing to do with perl anyways. Or
they should be more realistic about what it really means.

The convenience store in the bad neighborhood will always get robbed
day in and day out, while the billions of dollars sitting in bank
accounts that nobody knows exists will remain untouched.



------------------------------

Date: 3 Mar 2005 20:46:01 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: disagree with a few things in perlsec
Message-Id: <Xns960EA06406E20asu1cornelledu@132.236.56.8>

el_roachmeister@yahoo.com wrote in news:1109882174.262420.288990
@g14g2000cwa.googlegroups.com:

> The convenience store in the bad neighborhood will always get robbed
> day in and day out, while the billions of dollars sitting in bank
> accounts that nobody knows exists will remain untouched.

This is as bad an analogy as I have ever heard. The reason bank accounts is 
not being robbed is not because nobody knows where the bank is or that the 
bank has accounts, but because of security mechanisms that assume people 
know the location of the bank and the money.

But, then, your posting history does tell us something:

http://tinyurl.com/5nzcp

Sinan


------------------------------

Date: 03 Mar 2005 21:13:31 GMT
From: xhoster@gmail.com
Subject: Re: disagree with a few things in perlsec
Message-Id: <20050303161331.090$6O@newsreader.com>

el_roachmeister@yahoo.com wrote:
> I disagree with a few things in perlsec relating to "Protecting your
> program", namely these two paragraphs:
>
> First of all, however, you can't take away read permission, because the
> source code has to be readable in order to be compiled and interpreted.
> (That doesn't mean that a CGI script's source is readable by people on
> the web, though.) So you have to leave the permissions at the socially
> friendly 0755 level. This lets people on your local system only see
> your source.
>
> Some people mistakenly regard this as a security problem. If your
> program does insecure things, and relies on people not knowing how to
> exploit those insecurities, it is not secure. It is often possible for
> someone to determine the insecure things and exploit them without
> viewing the source. Security through obscurity, the name for hiding
> your bugs instead of fixing them, is little security indeed.
> =======================================
>
> If you are concerned about security you why are you going to let people
> on your local system see your source? The default should be 700. You
> would only need 755 if you have a definite need to do so.

The unwritten assumption made by perlsec is that you need other people
to be able to run your code.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: 3 Mar 2005 13:20:27 -0800
From: el_roachmeister@yahoo.com
Subject: Re: disagree with a few things in perlsec
Message-Id: <1109884827.184030.63190@z14g2000cwz.googlegroups.com>


A. Sinan Unur wrote:
> el_roachmeister@yahoo.com wrote in news:1109882174.262420.288990
> @g14g2000cwa.googlegroups.com:
>
> > The convenience store in the bad neighborhood will always get
robbed
> > day in and day out, while the billions of dollars sitting in bank
> > accounts that nobody knows exists will remain untouched.
>
> This is as bad an analogy as I have ever heard. The reason bank
accounts is
> not being robbed is not because nobody knows where the bank is or
that the
> bank has accounts, but because of security mechanisms that assume
people
> know the location of the bank and the money.

I do not have hard facts to prove the analogy true so consider this
case. A wealthy person hides a treasure on an island. The probability
of it being found is proportional to the number of people that know
about it. Therefore the security measures to secure the treasure are
proportional to the number of people who know it exists. This the
principle I am trying to get accross, which perhaps my analogy did not
do a good job illustrating.

If I understand your point correctly you say the probability is the
same regardless of the number of "pirates" who know your treasure
exists. According to you the probability of it being found is only
based on the type of lock the wealthy person put on the treasure when
they buried it. Is that correct?

Relating this to perslec, someone may code the most secure script and
think their script is great because it has all the best built-in
security measures. One needs to use common sense to minimize the risk
of breaking into your script from multiple entry points. That's exactly
how hackers operate. They know great programmers write great scripts,
but that is their weakness, since they only focus on the script and not
the enviroment it is placed in.

> But, then, your posting history does tell us something:
> 
> http://tinyurl.com/5nzcp

Is referencing this really neccessarry?



------------------------------

Date: Thu, 3 Mar 2005 15:04:08 -0500
From: "L. D. James" <ljames@apollo3.com>
Subject: How to specify [regex] beginning of line/unlimited characters/no spaces terminatingn with ":"
Message-Id: <112ere217qe3s5a@corp.supernews.com>

     Hi, All.

     I was impressed with the one of the previous threads on deciphering
code and the comments on regex.  Many said it was apparently writing by a
very extreme novice.  I'm sure the code below will really take the cake.

     There are two blocks below.  The first block is a sample block of text.
This is a huge text file that has been collected.  I have tried to write a
script to input this text file into a table.

     I have a second question, of which I'll put in a different thread
because it's defined a little different.

Data File:
--------------------------------------------------
MessageType:               Signup
Questions:
Username:                    L. D. James
UserEmail:                    ljames@apollo3.com
UserTel:                       555-555-555
UserFax:                      222-222-222
AccountNumber:                       123
ContactRequested:        ContactRequested
Date:                            24 Feb 2005
Time:                            10:21:36
Comments:                     This is a unique comment.
The comment is continuing.  All the rest of the
text is part of the comment field.
--------------------------------------------------

Script to Analyze data file:
----------------------------------------------------
#!/usr/bin/perl
$/ =
"*******************************************************************************\n";
open (FILE,"../confirmation.txt");
@lines = <FILE>;
$numrecords = @lines;
print "There are $numrecords\n";
foreach $l (@lines)
{
    $sep = '\w+:';
    @REC = split(/$sep/,$l);
    $count = 1;
    foreach $r (@REC)
    {
        print "[$count] $r\n";
        $count++;
    }
}
-----------------------------------------------

     I believe the problem is that I'm trying to figure out a way that will
make every thing that begins a new line with any sequence of characters with
no spaces up to the first colon ":", the field separator.  I tried to put
the separator as, $sep='^\w+:'; with intentions that the "^" will indicate
that this is the start of a line.  However, when I place the "^" symbol, it
fails worse.

     By the way, the "Comment:" file is random text that includes new lines.

     I know my terminology is very crude.  As people respond, I'm sure I'll
soon speak better Perl.

     Thanks in advance for any suggestions or comments.


                                 -- L. James

-- 
--------------------------------
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames 




------------------------------

Date: 3 Mar 2005 13:30:01 -0800
From: "Jim Keenan" <jkeen_via_google@yahoo.com>
Subject: Re: How to specify [regex] beginning of line/unlimited characters/no spaces terminatingn with ":"
Message-Id: <1109885401.403847.38770@o13g2000cwo.googlegroups.com>

L. D. James wrote:
> Hi, All.
>
>      I was impressed with the one of the previous threads on
deciphering
> code and the comments on regex.  Many said it was apparently writing
by a
> very extreme novice.  I'm sure the code below will really take the
cake.
>
>      There are two blocks below.  The first block is a sample block
of text.
> This is a huge text file that has been collected.  I have tried to
write a
> script to input this text file into a table.
>
>      I have a second question, of which I'll put in a different
thread
> because it's defined a little different.
>
> Data File:
> --------------------------------------------------
> MessageType:               Signup
> Questions:
> Username:                    L. D. James
> UserEmail:                    ljames@apollo3.com
> UserTel:                       555-555-555
> UserFax:                      222-222-222
> AccountNumber:                       123
> ContactRequested:        ContactRequested
> Date:                            24 Feb 2005
> Time:                            10:21:36
> Comments:                     This is a unique comment.
> The comment is continuing.  All the rest of the
> text is part of the comment field.
> --------------------------------------------------
>
> Script to Analyze data file:
> ----------------------------------------------------
> #!/usr/bin/perl
> $/ =
>

use strict;
use warnings;

"*******************************************************************************\n";
> open (FILE,"../confirmation.txt");
> @lines = <FILE>;
> $numrecords = @lines;
> print "There are $numrecords\n";
> foreach $l (@lines)

perldoc -f chomp

> {
>     $sep = '\w+:';
>     @REC = split(/$sep/,$l);

This is probably better handled with a full regular expression rather
than 'split'; see below.  Specifically, you should consult the
documentation (or the Camel book) re:  non-greedy pattern matching.

Here is a starting point.  It doesn't attempt to solve all your
problems, e.g., I leave the Comment line for you to figure out.

Jim Keenan

###########

#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;

my %individual;

while (<DATA>) {
    chomp;
    if (/^(\w+?):\s+(.*)/) {
        my $key = $1;
                my $value = $2;
                $individual{$key} = $value;
        } else {
        print "Non-matching line: $_\n";
    }
}
print Dumper(\%individual);


__DATA__
MessageType:               Signup
Questions:
Username:                    L. D. James
UserEmail:                    lja...@apollo3.com
UserTel:                       555-555-555
UserFax:                      222-222-222
AccountNumber:                       123
ContactRequested:        ContactRequested
Date:                            24 Feb 2005
Time:                            10:21:36
Comments:                     This is a unique comment.
The comment is continuing.  All the rest of the
text is part of the comment field.



------------------------------

Date: 3 Mar 2005 16:33:51 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to tell if the filesystem is RO?
Message-Id: <d07e9f$6th$1@mamenchi.zrz.TU-Berlin.DE>

Big and Blue  <No_4@dsl.pipex.com> wrote in comp.lang.perl.misc:
> Michael W Cocke wrote:

[...]

>     However, that is a *very* specific case.  Iff the remount-ro is 
> reflected in /proc/mounts then just parse that file (which I leave as an 
> exercise to you).

Only a few Unices have /proc and the details of what is in it and how
it is represented vary.  Even if it happens to work on one machine it
won't be portable.

To bring this a bit on topic again:

The Sys::Filesystem module from CPAN (already mentioned) lets you
retrieve the mount options of a file system.  This looks like the
best bet to me.

Anno


------------------------------

Date: Thu, 3 Mar 2005 14:09:27 -0500
From: "L. D. James" <ljames@apollo3.com>
Subject: Re: Importing records with both space and quoted text qualifiers...
Message-Id: <112eoct1p6dfv8e@corp.supernews.com>

"Alan J. Flavell" <flavell@ph.gla.ac.uk> wrote in message
news:Pine.LNX.4.61.0503020044361.16993@ppepc56.ph.gla.ac.uk...
> On Tue, 1 Mar 2005, L. D. James wrote:

> Your application for admission to the killfile has been approved.
>
> Pity you didn't see fit to discuss Perl.

     Hi, Alan...  Did you read the thread?  You couldn't see from the thread
that much of the content was a discussion for various ways of applying
separators to a file VIA Perl?

     Did you notice that much of my messages were acknowledgement and an
attempt to express appreciation for all the good suggestions that were
given?  It appeared to me that one of the initial posters replying thought I
was ungrateful because the question continued even after they had posted a
solution?  I tried to respectful reply and let the poster know that I had
used the suggestion, but still had some questions that, I appreciate was
subsequently answered.

     I did what I could to explain that I was trying to understand some of
the functions and terminology, that's why I continued the question on some
of the points, after receiving a very immediate suggestion to the initial
question.

     Then, of course there were some messages (that I didn't mean to
initiate), that I respectfully replied to, regarding guidelines.  I don't
know if you can tell that I have been taking my time and doing a lot of
studying of the guidelines, and trying not to break them.  I did try to
reply with some type of acknowledgement of my understanding of them, so that
I could continue in the right direction with respect.

     I even ran one of my messages through a spell and grammar checker to
try to be clear and appropriate.  It skewed my signature.  I didn't know
until it was posted.  I tried to fix it, but didn't know how that one would
turn out before it happened to appear in the base.

     I apologize.  Hopefully the majority of the group can some someone with
good intentions trying to participate in what appears to be a great group.

     Sorry you can't see my points.  However, I will talk about Perl and
technology.  I'll also try to give a very intellectual discussion and
acknowledgement to the users who have questions about my understandings of
the guidelines and procedures.  I believe some of the discussions that this
tread had contained is some of the morphoses that has helped this group to
grow to such integrity.

     By the way, here's another attempt at getting my signature right.  I
understand if someone comments that it's still wrong.

                                                           -- L. James
-- 
--------------------------------
L. D. James
ljames@apollo3.com
www.apollo3.com





------------------------------

Date: Thu, 3 Mar 2005 14:29:57 -0500
From: "L. D. James" <ljames@apollo3.com>
Subject: Re: Importing records with both space and quoted text qualifiers...
Message-Id: <112epdv4dnq3l84@corp.supernews.com>


"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnd2bgod.8g0.tadmc@magna.augustmail.com...
> Tad McClellan <tadmc@augustmail.com> wrote:
>> L. D. James <ljames@apollo3.com> wrote:
>>> "Tad McClellan" <tadmc@augustmail.com> wrote in message
>>> news:slrnd2a1g0.28j.tadmc@magna.augustmail.com...
>>>> L. D. James <ljames@apollo3.com> wrote:
>>>>
>>>> [snip]
>>
>>>> Thanks for fixing the top-posting.
>>
>>>      I'm insulted with the continued reference to top posting.
>>
>> I was *thanking* you for stopping, where is the insult in that?
>>
>> I don't get it...
>
>
> After a good night's sleep I now *do* get it, and it appears that
> I knee-jerked somewhat last night. For that I apologize.

     Thanks for the consideration for what I might have thought (even though
I might have been wrong also).  I tried to reply in an effort to be seen as
one concerned about learning, both the namesake, Perl, and the procedures
and guidelines to be a contributor to a fine group.


                -- L. James
-- 
--------------------------------
L. D. James
ljames@apollo3.com
www.apollo3.com





------------------------------

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 7850
***************************************


home help back first fref pref prev next nref lref last post