Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: file test operation on files greater than 2gigs

by Corion (Pope)
on Aug 01, 2013 at 10:49 UTC ( #1047420=note: print w/replies, xml ) Need Help??

in reply to file test operation on files greater than 2gigs

Besides recompiling Perl, the only way is to call the OS tools, which hopefully know how to deal with file sizes larger than 32 bit:

my $output= `ls -l "$filename"` # Parse the output of ls

Replies are listed 'Best First'.
Re^2: file test operation on files greater than 2gigs
by Anonymous Monk on Aug 01, 2013 at 11:50 UTC
    Probably better to use the output of stat(1). Trying to parse ls(1) is well known to be a bad idea.
    my $size = `stat -f %z yourfile.txt`;
      ...except that the GNU version uses -c %s for the format string argument. Ah well. Portability woes everywhere.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047420]
[Cosmic37]: greetings earthlings please can someone improve my pathetic perl knowledge
[Cosmic37]: I have 2 files each with datetime and other data in unknown order and I want to find rows from both files matching by datetime and output them combined/ concatenated
[Corion]: Sure
[Corion]: Do you have any specific interests or general Perl knowledge?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-06-29 16:15 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (672 votes). Check out past polls.