xml with namespace not getting parsed in perl

I have an xml with default namespace something like this: <?xml version="1.0" encoding="utf-8"?> <start xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://127.0.0.1 ...
more »

2017-11-11 11:11 (1) Answers

perl IO::Socket is deaf on a New Centos 7 machine

The code below has worked for over a decade and still does on the handful of machines (on a private LAN) running various flavors of linux, that I have it installed on -- until yesterday. Yesterday, I tried it on a freshly installed CentOS 7 machine a...
more »

2017-11-01 18:11 (1) Answers

Perl: JSON fails if a thread is started

Can someone please tell my why JSON is not working if some thread is started? use strict; use warnings; use JSON; use threads; use threads::shared; sub th { } threads->create(\&th)->join() if $ARGV[0]; my $json = to_json({ val => "...
more »

2017-10-17 17:10 (2) Answers

perl xs - return perl array from c array

Using XS i am trying to pass values from a C array into a Perl array that can be used in the script. Here is the code from my xs file: AV * DoubleArray::getPerlArray() CODE: r = newAV(); for(size_t i=0; i < THIS->count; i++) {...
more »

2017-10-12 23:10 (1) Answers

Perl, SVN::Hooks, and SVN::Hooks::Notify

Can anyone tell me offhand if SVN::Hooks::Notify's NOTIFY and NOTIFY_DEFAULTS blocks replace (or rather, stop the evaluation of) the POST_COMMIT block? My PRE_COMMIT block works fine, and my existing NOTIFY/NOTIFY_DEFAULTS blocks process just fine. ...
more »

2017-09-18 00:09 (1) Answers

Perl utf8 binmode unexpected results

Why does binmode as raw produce the umlaut? Could any elaboration be given regarding how 'Zurich' String is stored internally in Perl? Just a little lost. use strict; use warnings; my $filename = "result-test-encoding-raw.xml"; open(my $fh,'>', ...
more »

2017-09-05 22:09 (2) Answers

I want to output 4 byte signed integer type value

I am using a Perl script. I want to use 32 byte signed integer form like c language. For example, if I add 1 to the integer value, I want to output it as shown below. my $val = 0; while(1){ print $val++; } ------------------------------- The de...
more »

2017-09-04 10:09 (2) Answers

embedded perl in C - set working directory

How to tell the embedded perl in C what's it's working directory? It seems that it's set to the directory of the executable in which embedded perl is used. Setting the directory from outside before invoking the embedded perl stuff doesn't change it'...
more »

2017-09-01 14:09 (2) Answers

Perl: Find ranges of numbers in an array

In Perl, if I have a sorted array of integers, is there a compact way to convert it to a list or array of ranges of integers? E.g. suppose I have: my @numbers=(3,4,5,6,9,10,12,14,15,16,17); I would like a way to determine that the ranges of num...
more »

2017-08-29 22:08 (3) Answers

Using Linux Wildcard character in Perl Script

I have two files. ~/directory1/7120599_S1.txt hello world! ~/directory2/7120599_S7.txt bye world! I'm looking for Perl code that will append the contents of 7120599_S1.txt to the end of 7120599_S7.txt. The following command works in Linux: ...
more »

2017-08-26 21:08 (1) Answers

Executing Perl 6 code in Rmarkdown

I want to write some tutorials on Perl 6. For this I believe Rmarkdown would be of great help. So I am trying to execute Perl 6 code within Rmarkdown document. My Perl 6 executable is in C:\rakudo\bin. So my .Rmd file with example code to accompli...
more »

2017-08-24 11:08 (3) Answers

issue with sqlite while installing SVN::Core

I am trying to install SVN::Core in a Redhat 6 server, but every time I try to run cpan SVN::Core, it throws me an error that says: An appropriate version of sqlite could not be found. We recommmend 3.7.15.1, but require at least 3.7.12. Please eit...
more »

2017-08-23 20:08 (1) Answers

Fitting multiple curves to one data set

I have a data set that i receive from an outside source, and have no real control over. I can edit it ad infinitum, but cannot choose parameters by which to filter the set. The data, when plotted, shows two clumps of points with several sparse, irrel...
more »

2017-08-14 18:08 (0) Answers

How to avoid <defunct> processes?

I do ZFS remote replication from a master host to a slave host, where I have a Perl script that runs on the master host. For each filesystem it ssh to the remote host and start mbuffer in listening mode and then the script continues and then send th...
more »

2017-08-09 15:08 (2) Answers