Hello,
I need to progrmatically decode the following UTF-8 data via CGI:
q=%D7%91%D7%A8%D7%99%D7%AA
Can this be done?
-Kevin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
URI::Escape can do this for you.
# perl -MURI::Escape -e 'print \
uri_unescape(%D7%91%D7%A8%D7%99%D7%AA)' esc.txt
The contents of esc.txt:
\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa
Do what you need to with the output.
Cheers,
Kevin
On Sat, Oct 05, 2002 at 08:25:31AM -0700, Kevin ([EMAIL PROTECTED])
How can I get the selected items from a select multiple
Example:
form method=post action=do_it.pl
SELECT multiple size=7 name=component-select
OPTION name=first selected value=Component_1_aSelected
Component_1/OPTION
OPTION name=secondComponent_3/OPTION
OPTION
Read the docs for CGI.pm
perldoc CGI
Cheers,
Kevin
On Sat, Oct 05, 2002 at 07:33:33PM +0200, Vincent van Kuler ([EMAIL PROTECTED]) said
something similar to:
How can I get the selected items from a select multiple
Example:
form method=post action=do_it.pl
SELECT multiple size=7
Todd Wade wrote:
Richard wrote:
Hello
I wrote a script that creates dynamic html. I validated the resulting
html code with W3C and it couldn't validate it because it didn't detect
the character encoding. I added the meta information to the header with
the -meta argument:
snip /
You can use defined() function by checking for the
first element.
#!/usr/bin perl
use strict;
use warnings;
my @arr=(); ## empty
my $ref=\@arr; ##
if(!defined ($ref-[0]) {
# do your work here
}
if (!define ($arr-[0]) {
# do your work
}
--- dan [EMAIL PROTECTED] wrote: or
if (!$array[0])
I just noticed this thread, so forgive me if someone has already mentioned
this, or if I'm missing the original point. I just saw some bad examples of
how to accomplish what the subject asks, and felt I should chime in.
The idiomatic method for checking if an array has elements is simply:
Here's food for thought:
One of the more intriguing types of algorithm is the genetic algorithm.
Genetic algorithms mimic Darwinian natural selection, where fitness
selects individuals for survival, breeding, and, hence, adaptive mutation.
Genetic algorithms applied with Perl covered the
Is there a simple way to unflatten @_ into a list within a subroutine?
ie:
sub mySub(%);
mySub(arg1='val1',arg2='val2',arg3='val3')
now i want to expand @_ back into a list.
Cheers,
Grant
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
the reason to this being you need to append my to declare each variable
before use..
my $file;
my $in_dir;
my $tstopen;
etc..
try phrase it like this:
#!/usr/bin/perl
use strict;
use warnings;
# Open Files
my $in_dir;
opendir(IN_DIR, /opt/crxml/tstdir) or die directory does not exist;
# Read
Dharmender rai wrote:
You can use defined() function by checking for the
first element.
No, checking the first element of an array will tell you whether or not
the first element of the array is defined, it will not tell you if the
array is empty.
John
--
use Perl;
program
fulfillment
--
Grant Byers wrote:
Is there a simple way to unflatten @_ into a list within a subroutine?
ie:
sub mySub(%);
mySub(arg1='val1',arg2='val2',arg3='val3')
now i want to expand @_ back into a list.
Did you read the perlsub document that is supplied with Perl?
perldoc perlsub
John
--
If you want it in hash form, as it looks from your example, just copy
it to a hash:
my %hash = @_;
On Friday, October 4, 2002, at 11:57 PM, Grant Byers wrote:
Is there a simple way to unflatten @_ into a list within a subroutine?
ie:
sub mySub(%);
= Original Message From James Edward Gray II [EMAIL PROTECTED]
=
If you want it in hash form, as it looks from your example, just copy
it to a hash:
my %hash = @_;
Remember though that if you are passing anything in scalar context, like an
scalar or a reference, or more than one
[EMAIL PROTECTED] wrote:
Every time I send a message to this list, I receive a message from
[EMAIL PROTECTED] immediately afterwards. It appears to be garbage
(lots of screwy characters...).
Where is this coming from? Am I the only one receiving these?
i suspect there is/are bouncing
i'm looking for something like a sandbox/compartment (like rexec module
in python) so that i can be [reasonably] confident running untrusted
snippets of code from inside the same process.
Safe.pm seems like the perl way of doing it, right? however, from what i
skimmed from the posts i got from
Hi Gang,
Given this input:
222xxxJ
222wwwDD
222ccffFFF
909eee
909FFF
909j
888JJJ
888HHH
I'd like to split the input, group it by the first column, and, for that
group, print out a concatenated second
On Sat, Oct 05, 2002 at 07:02:09PM -0400, Paul Van Dalen wrote:
Hi Gang,
Given this input:
222xxxJ
222wwwDD
222ccffFFF
909eee
909FFF
909j
888JJJ
888HHH
I'd like to split the input, group
perl -pe 's/^(\d+\s+)([a-zA-Z]+)\s+([a-zA-Z]+)$/$1$2;$3/' infile
outfile
On Saturday, October 5, 2002, at 06:02 PM, Paul Van Dalen wrote:
Hi Gang,
Given this input:
222xxxJ
222wwwDD
222ccffFFF
909eee
909FFF
909j
If I want to run a script on any file with a .vhd extension in the
directory, how do I pass *.vhd to the perl script?
Easy one-line example (Note, I'm running on Windows): Say I want to find the
pattern COMPONENT in any file with a .vhd extension:
perl -lane if (/COMPONENT/) { printf \$ARGV
20 matches
Mail list logo