I have a hash in Perl which has been dumped into from some legacy code the name of the key has now changed from simply reqHdrs to reqHdrs.bla
$rec->{reqHdrs.bla}
My problem is now I cant seem to access this field from the hash any ideas?
The following is my error
Download Script Output: Bareword "reqHdrs" not allowed while "strict subs" in use
I have a shell script, with a list of shell variables, which is executed before entering a programming environment.
I want to use a perl script to enter the programming environment:
system("environment_defaults.sh");
system("obe");
but I when I enter the environment the variables are not set.
how convert string into Unicode string in Perl.
I am looking some attribute in LDAP which accepts only Unicode string .
So i want to convert normal string to Unicode string
I am using jalava library as a diagram drawing tool.
It displays firgures as images in order to maintain compatibility with majority of browsers.
When diagram block is being resized a request is being made and new gif image is generated and send to browser.
What I need is generating image of basic blocks, like rounded rectangle, circle, diamond with specified parameters (height, width and color).
I want to do all server-side; my server part is written on Perl.
I have a computationally expensive task in perl, and would like to inform the user that computation is ongoing by printing out a period after each portion of the computation is completed. Unfortunately, until I print a "\n", none of my periods are printed. How can I address this?
how convert string into unicode string in Perl.
I am looking some attrribute in LDAP which accpets only unicode string .
So i want to convert normal string to unicode string
Hi I'm looking for a Perl RESTful framework that have to :
work under apache2/mod_perl2
be simple
be elegant
be light
be flexible
Am I just dreaming or can I avoid the 'Roll our own' approach?
What framework would you recommend?
I am doing the below in a perl script:
my @pm1_CS_missing_months = `sqlplus -s $connstr \@DLmissing_months.sql`;
it takes the output of an sql query.
if i have to check for no rows selected,how could i do it?
i want to do like this:
if(no rows selected)
{
do this;
}
i can thought that it will open a shell, execute the parameter (shell command) and return the result in a scalar.
But, execute 'system' function in a perl script is faster than a shell command.
It will call this command in C?
If yes, what's the difference between
rmdir foo
and
system('rmdir foo');
Thanks,
Hi everyone,
I am trying to write a simple Perl CGI script that:
-runs a CLI script
-reads the resulting .out file and converts the data in the file to an HTML table.
Here is some sample data from the .out file:
10.255.202.1 2472327594 1720341
10.255.202.21 2161941840 1484352
10.255.200.0 1642646268 1163742
10.255.200.96 1489876452 1023546
10.255.200.26 1289738466 927513
10.255.202.18 1028316222 706959
10.255.200.36 955477836 703926
Any help would be much appreciated.
-Sebastian
If I have a hash in Perl that contains complete and sequential integer mappings (ie, all keys from from 0 to n are mapped to something), is there a means of converting this to an Array?
I know I could iterate over the key/value pairs and place them into a new array, but something tells me there should be a built-in means of doing this.
What is the best way to achieve sscanf like functionality in perl?
I am looking now looking at the sscanf module,
Which is better,
Option-1: Going sscanf way?
Option-2: Regex way? [I am a beginner when it comes to Regex]
How do I do the following in Perl in order:
a) curl a page and save it to a variable
b) parse the value of the variable (which is HTML content) for values I want (ex: the info is kept between tags like ... )
I am new to any scripting language. But, still I worked on scripting a bit like tailoring other scripts to work for my purpose. For me, what is the best online resource to learn Perl?
So I am trying to read an XML file into a string in Perl and send it as part of a SOAP message. I know this is not ideal as there are methods for SOAP sending files, however, I am limited to having to use the SOAP that is set up, and it is not set up for sending with file support.
Therefore I need to parse out the markup tags < and replace them with []. What is the best way to do this?
Is it possible to use a Perl hash in a manner that has O(log(n)) lookup and insertion?
By default, I assume the lookup is O(n) since it's represented by an unsorted list.
I know I could create a data structure to satisfy this (ie, a tree, etc) however, it would be nicer if it was built in and could be used as a normal hash (ie, with %)
I don't really understand how scoping works in perl modules. This doesn't print anything. I would like it if running a.pl printed 1
b.pm
$f=1;
a.pl
use b;
print $f
I'm looking for a way of mapping a uid (unique number representing a system user) to a user name using Perl.
Please don't suggest greping /etc/passwd :)
I don't really understand how scoping works in Perl modules. This doesn't print anything. I would like it if running a.pl printed 1
b.pm
$f=1;
a.pl
use b;
print $f