[28511] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9875 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 21 14:05:48 2006

Date: Sat, 21 Oct 2006 11:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 21 Oct 2006     Volume: 10 Number: 9875

Today's topics:
    Re: avoid multiple script startup overhead (reading news)
        Best way to keep registered users logged in? kidalex@gmail.com
    Re: Best way to keep registered users logged in? usenet@DavidFilmer.com
    Re: How can i find source code like Data::Dumper in per <rvtol+news@isolution.nl>
    Re: How can i find source code like Data::Dumper in per <bik.mido@tiscalinet.it>
    Re: how to do programming in perl in windows <joe@inwap.com>
    Re: Inappropriate ioctl for device using system("userad <joe@inwap.com>
    Re: Matching umlauts <hjp-usenet2@hjp.at>
    Re: Matching umlauts <hjp-usenet2@hjp.at>
        new CPAN modules on Sat Oct 21 2006 (Randal Schwartz)
    Re: perlembed - how to get 'use constant' values <rvtol+news@isolution.nl>
        Reverse algorithm with tangent <bart@nijlen.com>
    Re: Sorting Data in Two Columns <alison@logicsaysNOSPAM.com>
    Re: Sorting Data in Two Columns (reading news)
    Re: Sorting Data in Two Columns <john@castleamber.com>
    Re: unable to calculate large file size <hjp-usenet2@hjp.at>
    Re: unable to calculate large file size <bik.mido@tiscalinet.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 21 Oct 2006 09:13:36 GMT
From: "Mumia W. (reading news)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: avoid multiple script startup overhead
Message-Id: <4xl_g.12527$Y24.8280@newsread4.news.pas.earthlink.net>

On 10/20/2006 05:31 PM, inetquestion wrote:
> I'd like to get some opinions on possible new solutions to handle a
> problem we are seeing on our solaris servers due to various cron jobs
> aligning at various times throughout the hour.  The obvious answer of
> changing the times so they do not line up really isn't feasible and
> wont really buy us much in the long term.  What we've see is the
> spawning of new perl and ksh interpreters to run various scripts is
> what is consuming the bulk of the cpu.  One idea I've been
> contimplating for perl is
> having one master script running to avoid starting the interpreter up
> each minute.  What I'm unclear about is the ability to fork off entire
> scripts from there.  Will this use an instance of the existing
> interpreter, or just spawn another instance.  I'm not sure if this
> approach even begins to address
> the same concerns with ksh scripts.  Any suggestions along these lines
> or completely new ideas altogether?
> 
> Regards,
> 
> -Inet
> 

I'm making some assumptions about what you're trying to do. You seem to 
want to eliminate the interpreter startup overhead. I think that you can 
do this by having a perl process that stays active and periodically 
executes a file (using "do").

Then you'd write your cron processes to write to that file.


-- 
paduille.4060.mumia.w@earthlink.net


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

Date: 21 Oct 2006 01:40:54 -0700
From: kidalex@gmail.com
Subject: Best way to keep registered users logged in?
Message-Id: <1161420054.320466.218590@k70g2000cwa.googlegroups.com>

What is the best way of password protection that you think is the most
secure when it comes to keeping your users logged in to the site?

- Cookies session tracking
- Session ID passed from page to page through URL?
- htaccess protection

And why?

Thank you so much!
Alex



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

Date: 21 Oct 2006 01:57:54 -0700
From: usenet@DavidFilmer.com
Subject: Re: Best way to keep registered users logged in?
Message-Id: <1161421074.416781.294450@i42g2000cwa.googlegroups.com>

kidalex@gmail.com wrote:
> What is the best way of password protection

This question has absolutely nothing whatsoever to do with Perl.  You
will probably get better responses if you ask in a web-related
newsgroup.

-- 
David Filmer (http://DavidFilmer.com)



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

Date: Sat, 21 Oct 2006 13:18:00 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: How can i find source code like Data::Dumper in perl package
Message-Id: <ehd6qv.1cc.1@news.isolution.nl>

Michele Dondi schreef:
> David Squire:

>> what does the '-l' switch do
>
> perldoc perlrun
> (it print()s "\n".)

More exactly, it creates a BEGIN-block that sets the value of $\ to
"\n".

  perl -MO=Deparse -lwe '#what does the "-l" switch do'

  perl -lwe '$\="\tdef\t"; $_="abc"; print'


See `perldoc perlvar` about $\.

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: 21 Oct 2006 15:24:50 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How can i find source code like Data::Dumper in perl package
Message-Id: <vp7kj2p862fpi12a1ki6mvcjjr5gvqov2m@4ax.com>

On Sat, 21 Oct 2006 13:18:00 +0200, "Dr.Ruud"
<rvtol+news@isolution.nl> wrote:

>> perldoc perlrun
>> (it print()s "\n".)
>
>More exactly, it creates a BEGIN-block that sets the value of $\ to
>"\n".

Indeed. I meant 'to the effect of print()ing "\n" at the end of your
lines', or something like that...


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Sat, 21 Oct 2006 02:54:08 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: how to do programming in perl in windows
Message-Id: <ot2dndCfBogOc6TYnZ2dnUVZ_v2dnZ2d@comcast.com>

Jack wrote:
> Hello all
>         I am a new perl programmer and i have been doing many programs
> in perl o UNIX machine but im unable to run a program on my windows
> using active perl

If you want to run Unix perl scripts with no modifications on Windows,
you can forget about ActivePerl and instead run the perl that
comes with cygwin.  Download the setup program from http://cygwin.com
and select perl from the Perl category (or Interpreters category).
	-Joe


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

Date: Sat, 21 Oct 2006 03:08:54 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: Inappropriate ioctl for device using system("useradd")
Message-Id: <EOidnchWT6qab6TYnZ2dnUVZ_qmdnZ2d@comcast.com>

samasama wrote:
>   My line of code is simply...
> 
> system("/usr/sbin/useradd $luser -M -n -c '$opts[4]' -d $opts[5] -s
> $opts[6]") || die "Useradd : $!\n";
> 
>  and dying with:
> Useradd : Inappropriate ioctl for device
> 
> I haven't a clue : )

   system("...") == 0 or die "useradd failed with \$?=$?";


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

Date: Sat, 21 Oct 2006 18:09:32 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Matching umlauts
Message-Id: <slrnejkhhs.f40.hjp-usenet2@yoyo.hjp.at>

On 2006-10-20 10:36, Paul Lalli <mritty@gmail.com> wrote:
> fritz-bayer@web.de wrote:
>> Paul Lalli wrote:
>> > #!/opt2/perl/bin/perl
>> > use strict;
>> > use warnings;
>> > use locale;
>> > use POSIX qw(locale_h);
>> >
>> > $_ = "Sí señor!";

As an addition to the UTF-8/MIME discussion we had earlier:

I think it would be a good idea to explicitely indicate which charset a
script should be stored in if that is relevant to its function. Your
script works if it is stored as iso-8859-1, but not if it is stored as
utf-8, for example.


>> > Before locale in effect:
>> > S
>> > se
>> > or
>> > After locale in effect:
>> > Sí
>> > señor
>> >
>>
>> I ran it and got
>>
>> Before locale in effect:
>> Sí
>> señor
>> After locale in effect:
>> Sí
>> señor
>>
>> Have you actually run the program?
>
> Yes.  I ran it and it produced the output I posted.  You apparently
> already have locales enabled via an environment variable.

Locales are enabled via "use locale" in Perl. So you have them enabled
before the call to setlocale, too. You just switch to a *different*
locale. If you don't have LANG or any of the LC_* environment variables
set, your locale is "C", which implies (on most systems) the US-ASCII
charset which doesn't define character 0xF1 (and an undefined character
isn't a word character, obviously).

	hp


-- 
   _  | Peter J. Holzer    | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR       | > ist?
| |   | hjp@hjp.at         | Was sonst wäre der Sinn des Erfindens?
__/   | http://www.hjp.at/ |	-- P. Einstein u. V. Gringmuth in desd


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

Date: Sat, 21 Oct 2006 18:29:13 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Matching umlauts
Message-Id: <slrnejkimp.f40.hjp-usenet2@yoyo.hjp.at>

On 2006-10-18 16:50, fritz-bayer@web.de <fritz-bayer@web.de> wrote:
> I have to match words, which contains umlauts like äöü and also
> french and other ones.
>
> Is there a way to use regular expressions in such a way that those get
> treated like their normal corresponding letters?
>
> In other words, that "München" = "Munchen" when I do a pattern match
> with =~ ?

I'd more expect to want to match "München" to "Muenchen", but ...

Unicode has the concept of "combining characters". So "\x{00FC}" (LATIN
SMALL LETTER U WITH DIAERESIS) is really the same as "\x{0075}\x{0308}"
(LATIN SMALL LETTER U followed by COMBINING DIAERESIS). There are rules
for "canonicalization" or "normalization" which determine which of the
equivalent forms should be used. By canonicalizing to the longes form 
(i.e replacing each "\x{00FC}" with "\x{0075}\x{0308}" and then
stripping the combining characters you would replace all accented
characters with their base characters and so turn "München" into
"Munchen".

There is a perl module Unicode::Normalize, which I think should do what
you want but I've never used it.

	hp

-- 
   _  | Peter J. Holzer    | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR       | > ist?
| |   | hjp@hjp.at         | Was sonst wäre der Sinn des Erfindens?
__/   | http://www.hjp.at/ |	-- P. Einstein u. V. Gringmuth in desd


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

Date: Sat, 21 Oct 2006 04:42:05 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Oct 21 2006
Message-Id: <J7GyE5.12qJ@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Album-1.04
http://search.cpan.org/~jv/Album-1.04/
Create and maintain browser based photo albums
----
Alien-wxWidgets-0.24
http://search.cpan.org/~mbarbon/Alien-wxWidgets-0.24/
building, finding and using wxWidgets binaries
----
Archive-Extract-0.14
http://search.cpan.org/~kane/Archive-Extract-0.14/
A generic archive extracting mechanism
----
CGI-Application-Plugin-Output-XSV-1.00
http://search.cpan.org/~zackse/CGI-Application-Plugin-Output-XSV-1.00/
generate csv output from a CGI::Application runmode
----
CPANPLUS-0.77_02
http://search.cpan.org/~kane/CPANPLUS-0.77_02/
API & CLI access to the CPAN mirrors
----
Class-Simple-0.02
http://search.cpan.org/~sullivan/Class-Simple-0.02/
Simple Object-Oriented Base Class
----
Class-Simple-0.03
http://search.cpan.org/~sullivan/Class-Simple-0.03/
Simple Object-Oriented Base Class
----
ClearCase-CRDB-0.15
http://search.cpan.org/~dsb/ClearCase-CRDB-0.15/
Class for ClearCase config-record analysis
----
Compress-LZW-Progressive-0.1
http://search.cpan.org/~ewaters/Compress-LZW-Progressive-0.1/
Progressive LZW-like compression
----
Crypt-Util-0.01
http://search.cpan.org/~nuffin/Crypt-Util-0.01/
A lightweight Crypt/Digest convenience API
----
DBIx-Class-Schema-Loader-0.03008
http://search.cpan.org/~blblack/DBIx-Class-Schema-Loader-0.03008/
Dynamic definition of a DBIx::Class::Schema
----
Data-Domain-0.01
http://search.cpan.org/~dami/Data-Domain-0.01/
Data description and validation
----
Data-Paginate-v0.0.2
http://search.cpan.org/~dmuey/Data-Paginate-v0.0.2/
Perl extension for complete and efficient data pagination
----
Drupal-Module-Starter-0.05
http://search.cpan.org/~smcnabb/Drupal-Module-Starter-0.05/
Create Drupal Module starter files
----
Gantry-3.42
http://search.cpan.org/~philcrow/Gantry-3.42/
Web application framework for mod_perl, cgi, etc.
----
Genezzo-0.66
http://search.cpan.org/~jcohen/Genezzo-0.66/
an extensible database with SQL and DBI
----
HTML-Adsense-0.1
http://search.cpan.org/~sock/HTML-Adsense-0.1/
Create adsense widgets easily
----
IPC-Cmd-0.34
http://search.cpan.org/~kane/IPC-Cmd-0.34/
finding and running system commands made easy
----
Mail-DeliveryStatus-BounceParser-1.517
http://search.cpan.org/~rjbs/Mail-DeliveryStatus-BounceParser-1.517/
Perl extension to analyze bounce messages
----
Mail-Karmasphere-Client-2.04
http://search.cpan.org/~shevek/Mail-Karmasphere-Client-2.04/
Client for Karmasphere Reputation Server
----
Net-Flickr-API-1.62
http://search.cpan.org/~ascope/Net-Flickr-API-1.62/
base API class for Net::Flickr::* libraries
----
Net-Flickr-Backup-2.95
http://search.cpan.org/~ascope/Net-Flickr-Backup-2.95/
OOP for backing up your Flickr photos locally
----
Net-Flickr-RDF-1.94
http://search.cpan.org/~ascope/Net-Flickr-RDF-1.94/
a.k.a RDF::Describes::Flickr
----
Object-InsideOut-2.15
http://search.cpan.org/~jdhedden/Object-InsideOut-2.15/
Comprehensive inside-out object support module
----
POE-Component-IRC-Plugin-RSS-Headlines-1.00
http://search.cpan.org/~bingos/POE-Component-IRC-Plugin-RSS-Headlines-1.00/
A POE::Component::IRC plugin that provides RSS headline retrieval.
----
POE-Filter-FSSocket-0.05
http://search.cpan.org/~ptinsley/POE-Filter-FSSocket-0.05/
a POE filter that parses FreeSWITCH events into hashes
----
POE-Filter-LZW-Progressive-0.1
http://search.cpan.org/~ewaters/POE-Filter-LZW-Progressive-0.1/
A POE filter wrapped around Compress::LZW::Progressive
----
Rose-DB-0.728
http://search.cpan.org/~jsiracusa/Rose-DB-0.728/
A DBI wrapper and abstraction layer.
----
Rose-DB-Object-0.755
http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.755/
Extensible, high performance RDBMS-OO mapper.
----
Rose-HTML-Objects-0.541
http://search.cpan.org/~jsiracusa/Rose-HTML-Objects-0.541/
Object-oriented interfaces for HTML.
----
SNMP-Effective-1.0
http://search.cpan.org/~eidolon/SNMP-Effective-1.0/
----
Text-MultiMarkdown-1.0.1
http://search.cpan.org/~kulp/Text-MultiMarkdown-1.0.1/
----
Tripletail-0.19
http://search.cpan.org/~hio/Tripletail-0.19/
Tripletail, Framework for Japanese Web Application
----
UNIVERSAL-to_json-0.01
http://search.cpan.org/~kentaro/UNIVERSAL-to_json-0.01/
to_json() method for all objects.
----
WebService-Hatena-Graph-0.03
http://search.cpan.org/~kentaro/WebService-Hatena-Graph-0.03/
A Perl interface to Hatena::Graph API
----
Wx-0.59
http://search.cpan.org/~mbarbon/Wx-0.59/
interface to the wxWidgets cross-platform GUI toolkit
----
XML-Traverse-ParseTree-0.02
http://search.cpan.org/~mbusik/XML-Traverse-ParseTree-0.02/
iterators and getters for xml-access
----
lib-restrict-0.0.5
http://search.cpan.org/~dmuey/lib-restrict-0.0.5/
Perl extension for restricting what goes into @INC


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sat, 21 Oct 2006 13:32:23 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: perlembed - how to get 'use constant' values
Message-Id: <ehd7n6.s4.1@news.isolution.nl>

Mirco Wahab schreef:

> Uhh, a 'constant' is just a sub and returns everything
> written behind the '=>',

Yes, but also check the output of -MO=Deparse: there is inline
optimization.

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: 21 Oct 2006 08:59:58 -0700
From: "Bart Van der Donck" <bart@nijlen.com>
Subject: Reverse algorithm with tangent
Message-Id: <1161446398.499605.148740@i3g2000cwc.googlegroups.com>

Hello,

Here is some code:

    use Math::Trig;
    my $v = 0.6235584253;
    for (0..9)  {
      $v = $v + 1;
      $v = tan ($v); # tangent
      $v =~ s/\d{1,}\./0./; # no ^ for possible minus
    }
    print $v;

It prints -0.86659174554348. Is it logically/technically possible to
reverse this calculation ? In this example: start with
-0.86659174554348 and end up with 0.6235584253.

This topic was earlier started in sci.math, but no result.
(http://groups.google.com/group/sci.math/browse_frm/thread/2b7a2fd0737ffb28/)

Thanks,

-- 
 Bart



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

Date: Sat, 21 Oct 2006 09:33:38 +0100
From: "Alison" <alison@logicsaysNOSPAM.com>
Subject: Re: Sorting Data in Two Columns
Message-Id: <5cSdnRhwwM2jRqTYRVnyiw@bt.com>


John Bokma <john@castleamber.com> wrote in message
news:Xns9862CF8A3589Bcastleamber@130.133.1.4...
> "Alison" <alison@logicsaysNOSPAM.com> wrote:
>
> > Hello,
>
> I recommend to use a different structure. If you want to know the number
> of hits per referer [sic], use a hash with the referer the key, and the
> hits the value.
>
> my %referer_hits;............
>

Hi John,

Thank you.  I'll look into that further tonight.  It's going to require a
rewrite of three 10k .pl log analysis files, but if that's the way to do
it... :-)

Alison




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

Date: Sat, 21 Oct 2006 09:13:37 GMT
From: "Mumia W. (reading news)" <paduille.4060.mumia.w@earthlink.net>
Subject: Re: Sorting Data in Two Columns
Message-Id: <5xl_g.12528$Y24.10935@newsread4.news.pas.earthlink.net>

On 10/20/2006 07:41 PM, Alison wrote:
> Hello,
> 
> I'm having a bit of difficulty in the following and hoping for a solution.
> Have Googled over the last few days on and off.
> 
> Two columns of data; Referrers && Hits.  Rows are Referrer followed by total
> number of hits from the referrer.
> 
> Data is stored in an array with two elements per record.
> 
> $pointer = record_number * 2;
> 
> $current_referrer = $array[$pointer];
> $current_hits = $array[pointer+1];
> 
> Please may I ask how I would sort the rows based on the hits, in numerical
> order?  Or alternatively, sorting the rows alphabetically based on the
> referrers.
> 
> It's the keeping the two elements together as they are sorted where I'm
> getting really confused.  I can easily sort a single column of strings or
> numbers, but not two columns.
> 
> Perl/cgi/'C isn't my first language, microcontroller assembly language is.
> So my method would otherwise result in ALOT of manual coding.  I'm hoping
> this will only take just a couple of lines high level and be processor usage
> friendly.
> 
> Many thanks,
> 
> Alison
> 
> 

use strict;
use warnings;
use Data::Dumper;
my @array = (
     [ 'http://www.google.com/' , 318 ],
     [ 'http://www.aol.com/' , 98 ],
     [ 'http://search.yahoo.com/' => 120 ],
     [ 'http://search.netscape.com/' => 101 ],
     [ 'http://www.search.com/' => 42 ],
     [ 'http://search.go.com/' => 115 ],
);
my ($REFERRER, $HITS) = (0, 1);

my @sorted = sort { $b->[$HITS] <=> $a->[$HITS] } @array;
print Dumper(\@sorted);

__END__

Read the documentation:
perldoc perllol
perldoc -f sort


-- 
paduille.4060.mumia.w@earthlink.net


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

Date: 21 Oct 2006 17:01:20 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Sorting Data in Two Columns
Message-Id: <Xns98637A49441F0castleamber@130.133.1.4>

"Alison" <alison@logicsaysNOSPAM.com> wrote:

> 
> John Bokma <john@castleamber.com> wrote in message
> news:Xns9862CF8A3589Bcastleamber@130.133.1.4...
>> "Alison" <alison@logicsaysNOSPAM.com> wrote:
>>
>> > Hello,
>>
>> I recommend to use a different structure. If you want to know the
>> number of hits per referer [sic], use a hash with the referer the
>> key, and the hits the value.
>>
>> my %referer_hits;............
>>
> 
> Hi John,
> 
> Thank you.  I'll look into that further tonight.  It's going to
> require a rewrite of three 10k .pl log analysis files, but if that's
> the way to do it... :-)

I am sure it will make life easier. But if you extract data from an
access_log, and you have the referer, how do you update the count in
your array? If I recall correctly every even element contains the
referer, every odd one the count. 

This means that you have to look up the referer for each log line you
encounter in order to update the number of hits. That's horrible
inefficient. If you keep your referers sorted you need O(log k) steps to
find the referer. If you don't, it will be O( k ) (with k the number of
referers). 

The advantage of a hash is that you can easily find the right hit
counter and increment it ( O(1) ). 

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


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

Date: Sat, 21 Oct 2006 18:59:56 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: unable to calculate large file size
Message-Id: <slrnejkkgc.f40.hjp-usenet2@yoyo.hjp.at>

On 2006-10-19 02:48, himagauri@gmail.com <himagauri@gmail.com> wrote:
> The OS is Suse Linux and perl version is 5.8.3.
>
> Point is that I would later have to work on files >16 GB. Hence I
> haven't tested for intermediate values.
> Initially I thought the '-s' operator doesn't work for file sizes >1
> GB.

If SuSE has for some reason built perl without large file support, -s
won't work for files larger than 2 GB. 1 GB would be a strange file size
limit.

You can check whether perl has large file support by invoking

    /usr/bin/perl -e 'print -s "foo", "\n"'

It should print something like

    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
                                  ^^^^^^^^^^^^^^^^^^^^
If you don't have large file support, you can't handle files larger than
2GB. It may help to compile perl yourself, but your OS and libraries
need to support large files, too.

	hp



-- 
   _  | Peter J. Holzer    | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR       | > ist?
| |   | hjp@hjp.at         | Was sonst wäre der Sinn des Erfindens?
__/   | http://www.hjp.at/ |	-- P. Einstein u. V. Gringmuth in desd


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

Date: 21 Oct 2006 19:59:35 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: unable to calculate large file size
Message-Id: <nunkj25675nb7nmrbb48j1i3l0h6vjmq7t@4ax.com>

On Sat, 21 Oct 2006 18:59:56 +0200, "Peter J. Holzer"
<hjp-usenet2@hjp.at> wrote:

>    /usr/bin/perl -e 'print -s "foo", "\n"'
>
>It should print something like
>
>    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>                                  ^^^^^^^^^^^^^^^^^^^^

Really?!? ;-)

How 'bout 

  perl -V
  perl -V:uselargefiles

instead?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

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


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