On my Linux platform with 64bits recompiled perl and SSHing Mac terminal (I guess UTF-8). I am giving all this information just in case it might be relevant.
# perl -e 'use Digest::MD5 qw/md5_hex/; print(md5_hex("alex@vi\n") ."\n");'
756e98065cb8cbf603a3dbef2afe9261
# perl -e 'use Digest::MD5 qw/md5_hex/; print(md5_hex("alex@visi\n") ....
Please explain the Perl code below:
sub new {
my $class = shift;
my $self = {property => 'u', provider => 'ramesh'};
bless $self, $class;
return $self;
}
...
Hello, (Hallo!)
I'm searching an abstraction layer from pure HTTP-POST/-GET using curl. It should somehow make it easy to define the Targeted script and it's variables.
I read something exists in the FreeX (german unix/programming magazine), but don't have the named magazine at hand.
What can I do?
Stick with curl?
What alternatives...
Hi All,
I've got a Perl script which consumes an XML file on Linux and occasionally there are CRLF (Hex 0D0A, Dos new lines) in some of the node values which.
The system which produces the XML file writes it all as a single line, and it looks as if it occasionally decides that this is too long and writes a CRLF into one of the data e...
chromatic's recent blog got me curious about the Moose subroutine has. I was looking at the Moose source code and noticed that inside the has subroutine, there is a $meta variable unpacked from @_. Where does $meta come from? I've started wading through the various Moose and Class::MOP modules. In many subroutines, it seems that $meta is...
I want to fork a child ( which is my C executable ) and share a pipe between perl and C process,
Is it possible to have STDOUT and STDIN to use as pipe.
Tried with following code but child process keep continue running.
use IPC::Open2;
use Symbol;
my $CHILDPROCESS= "chile.exe";
$WRITER = gensym();
$READER = gensym();
my $pid = open2($...
I am working on a small perl program that will open a site and search for the words Hail Reports and give me back the information. I am very new to perl so some of this might be simple to fix. First my code says I am using an unitialized value. Here is what I have
#!/usr/bin/perl -w
use LWP::Simple;
my $html = get("http://www.spc.noaa....
I was recently trying to upgrade a few Perl modules on my cell phone (nokia n900), and installing the latest copy of Module::Build took the better part of an hour.
Most of the time (70% ish) seemed to be spent parsing and indexing the repository information.
It seems there are a few options, such as not rebuilding the index cache each...
I am very confused about how decimal numbers work in perl. I'm having trouble multiplying an int with a double. Here's what I have:
sub timeEstimate(){
$number = shift;
print "Number: $number\n";
$stuff = sprintf("%d", $number * $number * $number) * .2045;
print "stuff: $stuff\n";
$totalDownloads = $stuff + ($number * $number) + $number...
I have a perl .exe file that I was to run every ten minutes. I have set up the windows scheduler to run it and it says that it is successful but there is no output in the file. When I click the .exe myself it writes information to an output file. When the scheduler supposedly has ran it there is nothing in the file. Is there a code I can...
Hi,
I have a Perl CGI script that emits different HTML apparently randomly. None of the inputs change. E.g., I will run wget twice and get two different results. The CGI is backed by a development database that, too, doesn't change.
I have a debug statement that informs me that the same number of elements are returned from the DB into...
I'm applying UTF-8 encoding to STDIN and STDOUT. However how do I make sure that I apply UTF-8 encoding to the file that I pass to my code below (<> will read from a file instead of STDIN if a text file is passed on the command line) in as few lines as possible.
use open qw(:std :utf8)
while (<>) {
print;
}
...
How do I split a date that is of the form YYYYMMDD into its constituents?
my ($yyyy, $mm, $dd) = $date =~ /(\4d+)(\2d+)(\2d+)/;
...
Before:
<input type='checkbox' name='killerFeature' id='killerFeature'
<%= param('killerFeature') ? ' checked' : ''%>
/>
Now:
<select name="killerFeature" id="killerFeature" class="select">
<option value="1">Enable</option>
<option value="0">Disable</option>
</select>
How do I insert the same checked (should be 'selec...
% %p = ('option1' => 'Option 1',
% 'option2' => 'Option 2',
% 'option3' => 'Option 3'
% );
<select name="killer_feature" id="killer_feature" class="select">
% foreach (keys %p) {
% my $selected = param('killer_feature') && param('killer_feature') eq $_ ? 'selected="selected"' : '';
% if (!param('killer_feature') && $_ eq 'option2')...
Hello, I've considered making a closed source project, but if I made it then I'd want to make it in Ruby. Ruby is interpreted though. Other similar languages to Ruby include Python and Perl. How would you best distribute your code without giving away all the logic(at least easily readable)? And what about meta programming? Do obfuscaters...
I wanted to investigate if anyone has ever used a secondary key when inserting into the Heap::Simple in Perl? If so, was your performance ever impacted?
...
How to do continiously output of command (for me it's long ping) in real-time mode on Mojo server? I'm looking for some example on Mojo::IOLoop. For example, client connects to server and requests for ping X.X.X.X, server returns an non-buffered output (while ping on server return each line to output, client receive this line from socket...
I want to write one Pod file for perlop and perlopref. My gut instinct is to say something like
=head1 PRECEDENCE
blah
=head1 OPERATORS
=head2 "X"
=for short
The double quote circumflex operator surrounds an interpolating string.
See L<perlop/"X">.
=for long
-head3 Description
blah blah blah
-head3 Example
blah blah blah
-he...
Hello!
I need some infos about how i connect to a Hipath 3000 Series on the CSTA Interface.
I need a quickstart for the connect ... maybe someone with experience on Perl and howto make CSTA Link ?
Thanks a lot
...