22 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
653
views
How to install Oracle OCI header files for building things?
We have a web server running Oracle Enterprise Linux (OEL v6.8) which includes the Oracle HTTP Server (OHS; a customized version of Apache). The OS has Perl v5.10.1 installed. The database version ...
1
vote
1
answer
129
views
Encode - String bytes length
I've file file1.pl:
use strict;
use warnings;
use Encode;
my @flist = `svn diff --summarize ...`;
foreach my $file (@flist) {
my $foo = "$one/$file";
use bytes;
print(bytes::length($...
0
votes
1
answer
150
views
How to generate output files of excel format for each column of A i.e output files for App and Data each using perl code
This is the input file which is of excel format:
A
B
C
D
APP
1
210101
8.1
APP
2
210102
8.2
APP
3
210103
8.3
Data
4
210104
8.4
Data
5
210105
8.5
Data
6
210106
8.6
How to generate output files of excel ...
4
votes
2
answers
754
views
Perl signal handlers are reset in END blocks
This works as expected since Perl 5.10.1: SIGINTs are trapped.
#!/usr/bin/perl
use strict;
use warnings;
$SIG{INT} = sub { die "Caught a sigint $!" };
sleep(20);
But here SIGINTs are not trapped.
...
3
votes
1
answer
138
views
Matching a border of a russian word with \b
Is this a bug or am I doing something wrong (when trying to match Russian swear words in a multiplayer game chat log) on CentOS 6.5 with the stock perl 5.10.1?
# echo блядь | perl -ne 'print if /\...
1
vote
1
answer
571
views
What is here the recommended way the get rid of the "v-string in use/require non-portable" warning?
A module requires at least Perl 5.10.0.
When I use this module with Perl version 5.10.0 I get the warning:
v-string in use/require non-portable at ... (line of "use 5.10.0;").
In Perl 5.10.1 this ...
2
votes
1
answer
317
views
Perl: Adding writer in Moose class denies attribute access
I just started learning Moose, and I've created a very basic class. Here is my code:
Person.pm
package Person;
use Moose;
has fname => (
is => 'rw',
isa => 'Str',
reader => '...
0
votes
2
answers
262
views
Getting rid of warnings for undefined values when using Chart module
I'm using Chart module to generate charts in PNG format from CSV data:
It works well, the charts look okay, but I get warnings for the undef values (there are 3 such values at the end of the above ...
2
votes
3
answers
785
views
Adding new members while iterating a hash with "each"
In perl 5.10.1 is it ok to add new members to a hash while iterating through it with the each operator?
Smth. like in this code (preparing data for Google charts), where I have a hash of hashes of ...
-4
votes
2
answers
3k
views
Difference between perl 5.8 and 5.10 [closed]
I'm compiling some information related to the differences between 5.8 and 5.10. Can someone please point out the major differences, or tell me where I can begin my research?
4
votes
6
answers
8k
views
Can't use string ("1") as a subroutine ref while "strict refs" in use
In a Perl daemon reacting to various events I'm trying to use a Null object pattern in 2 cases by creating anonymous subroutines, which should just return a value of 1 aka "true" (please scroll to the ...
3
votes
1
answer
447
views
Efficient pre-perl-5.10 equivalent of pack("Q>")
Update: Salva correctly points out that I was wrong about the introduction of the "Q" pack template. It's the ">" modifier that doesn't go back to 5.8.
Perl 5.10 introduced the pack() modifier ">", ...
tsee's user avatar
- 5,095
2
votes
3
answers
967
views
How flush file in perl under mac?
I have perl, v5.10.0 built for darwin-thread-multi-2level in remote iMac. And I want to run some perl script which prints to file some data and flushes after each line of output.
$file_handle->flush();...
7
votes
2
answers
1k
views
How does O=Deparse work, and does Perl have and fold constant arrays?
I'm wondering, does -MO=Deparse show you all of the Perl optimizations, and why doesn't this get folded in Perl 5.10?
$ perl -MO=Deparse -e'[qw/foo bar baz/]->[0]'
['foo', 'bar', 'baz']->[0];
-...
19
votes
4
answers
976
views
The good, the bad, and the ugly of lexical $_ in Perl 5.10+
Starting in Perl 5.10, it is now possible to lexically scope the context variable $_, either explicitly as my $_; or in a given / when construct.
Has anyone found good uses of the lexical $_? Does ...