Hi,
I want to display 'canada', 'cane', 'canine, 'ca.e.02'.
Problem: It only displays 'canada'
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = (canada, cane, cane02, ca.e.02, canine,
.hidden);
foreach $file (@xfiles){
#want canada only for this iteration
if
I give thanks to everyone for all of the suggestions. Especially you
Jenda . Yours is the easiest to implement, and exactly what I was
looking for.
David
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I have an existing xml file that I need to display. Perl was
suggested a good way to do that.
I am using XML::Simple. None of the examples use the format that I
have.
Here is an example of what I am dealing with:
config
param name=SequenceNumber66/param
param name=T16/param
param
On Apr 2, 9:00 pm, [EMAIL PROTECTED] (Jennifer G.) wrote:
How do I know this day is in NO. which week in this year?
for example, Jan 1 is in the no.1 week of this year.
but how about the current day?
This seems to be a frequently asked question:
icarus wrote:
Hi,
Hello,
I want to display 'canada', 'cane', 'canine, 'ca.e.02'.
Problem: It only displays 'canada'
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = (canada, cane, cane02, ca.e.02, canine,
.hidden);
my @xfiles = (canada, cane, cane02, ca.e.02,
Thanks for the reply Yitze.
I simply wondered whether there was any benefit. I haven't yet tried
the perl -MCPAN approach but have spent most of the day in cpan. I
would expect to see perl -MCPAN in an anutomated approach somewhere I
guess.
I have successfully updated some modules locally
Seth wrote:
I have an existing xml file that I need to display. Perl was
suggested a good way to do that.
I am using XML::Simple. None of the examples use the format that I
have.
Here is an example of what I am dealing with:
config
param name=SequenceNumber66/param
param
Is there a 'bible' out there to read?
Depending on you level of faith:
learning perl by randal schwartz tom phoenix
the camel book by Larry wall
bless you, wolf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Is there a l link to a brief summary of perl (5-10 pages)?
What is the proper syntax to set LC_ALL for within a perl script?
I want to run linux commands like sort, grep, uniq from within a perl
script.
But I want them to optionally continue to act like pipes.
For example,
I want ./perlsort to
hi,
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = (canada, cane, cane02, ca.e.02, canine,
.hidden);
foreach $file (@xfiles){
#want canada only for this iteration
if ($file =~ /(canada)/){print $file\n - end first if - \n;}
#wb: (expression) groups what
Wolf Blaum wrote:
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @xfiles;
@xfiles = (canada, cane, cane02, ca.e.02, canine,
.hidden);
foreach $file (@xfiles){
#want canada only for this iteration
if ($file =~ /(canada)/){print $file\n - end first if - \n;}
#wb:
Thanks all.
Can you tell me which is the best repository to use? The ActiveState
one does not seem to have most of the modules I need.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Apr 2, 9:04 am, [EMAIL PROTECTED] (Matthew Whipple) wrote:
LC_ALL=C sort echo.txt
[EMAIL PROTECTED] wrote:
On Mar 29, 3:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
[EMAIL PROTECTED] wrote:
When I do string comparisons in perl the strings seem to ignore the
embedded hyphens.
dylanthomasfan wrote:
Hi All,
I already know of a way to do the following, but I want to know the
simplest way to do this in perl:
I have an input string which is of the following form:
((a+b)*c)*(e+f*(g+h-i*(j+k)))+u
I want to know how to split it easily so that I end up with an
dylanthomasfan wrote:
Hi All,
Hello,
I already know of a way to do the following, but I want to know the
simplest way to do this in perl:
I have an input string which is of the following form:
((a+b)*c)*(e+f*(g+h-i*(j+k)))+u
I want to know how to split it easily so that I end up with an
Jim wrote:
Can you tell me which is the best repository to use? The ActiveState
one does not seem to have most of the modules I need.
Really? Can you give us examples of such modules?
This is one of the AS repositories I'm using:
http://ppm4.activestate.com/MSWin32-x86/5.10/1002/
--
Gunnar
[EMAIL PROTECTED] wrote:
Is there a l link to a brief summary of perl (5-10 pages)?
http://perldoc.perl.org/perlintro.html
What is the proper syntax to set LC_ALL for within a perl script?
http://perldoc.perl.org/perllocale.html#The-setlocale-function
--
Gunnar Hjalmarsson
Email:
Hi
I am trying to regex a make output line (g++) and don't get it together.
What I want is:
All lines where the -c option does not occure, neither before nor after the -o
option and then extract the portion after the -o option.
$regexApplication = '(?![ \t]-c[ \t])-o[
Hi All,
I want to convert a string into a Hash data structure
For Example
String:
[['aaa',{27' = '543','21' = '111','Client' = '543','chat' = '111'}]]
Hash:
[['aaa',{27' = '543','21' = '111','Client' = '543','chat' = '111'}]
From CPAN I got a module called Convert/PerlRef2String
Hi
I just copied this script from CGI::Ajax manual at cpan.org page
use strict;
use CGI; # or any other CGI:: form handler/decoder
use CGI::Ajax;
my $cgi = new CGI;
my $pjx = new CGI::Ajax( 'exported_func' = \perl_func );
print $pjx-build_html( $cgi, \Show_HTML);
sub
On Fri, Apr 4, 2008 at 8:46 AM, [EMAIL PROTECTED] wrote:
Hi
I am trying to regex a make output line (g++) and don't get it together.
What I want is:
All lines where the -c option does not occure, neither before nor after the
-o option and then
extract the portion after the -o option.
From: Rob Dixon [EMAIL PROTECTED]
Seth wrote:
I have an existing xml file that I need to display. Perl was
suggested a good way to do that.
I am using XML::Simple. None of the examples use the format that I
have.
Here is an example of what I am dealing with:
config
param
From: Pau Marc Munoz Torres [EMAIL PROTECTED]
I just copied this script from CGI::Ajax manual at cpan.org page
use strict;
use CGI; # or any other CGI:: form handler/decoder
use CGI::Ajax;
my $cgi = new CGI;
my $pjx = new CGI::Ajax( 'exported_func' = \perl_func );
Pau Marc Munoz Torres wrote:
Hi
I just copied this script from CGI::Ajax manual at cpan.org page
use strict;
use CGI; # or any other CGI:: form handler/decoder
use CGI::Ajax;
my $cgi = new CGI;
my $pjx = new CGI::Ajax( 'exported_func' = \perl_func );
print
[EMAIL PROTECTED] wrote:
Hi
I am trying to regex a make output line (g++) and don't get it together.
What I want is:
All lines where the -c option does not occure, neither before nor after the
-o option and then extract the portion after the -o option.
$regexApplication = '(?![ \t]-c[
mmm
i did in a single line and i keep havinh the problem
my $html = EOHTML;HTMLBODYEnter something:input type=text
name=val1 id=val1onkeyup=exported_func( ['val1'], ['resultdiv']
);brdiv id=resultdiv/div/BODY/HTMLEOHTML
return $html;
2008/4/4, Rob Dixon [EMAIL PROTECTED]:
Pau
Pau Marc Munoz Torres wrote:
mmm
i did in a single line and i keep havinh the problem
my $html = EOHTML;HTMLBODYEnter something:input type=text
name=val1 id=val1onkeyup=exported_func( ['val1'], ['resultdiv']
);brdiv id=resultdiv/div/BODY/HTMLEOHTML
return $html;
You
Dont seem to have luck. I did make test followed by make install.
Here is what I got:
make install
Installing
/u/basappas/local/perl/Algorithm-Permute-0.06/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Algorithm/Permute/Permute.so
Installing
Rob == Rob Dixon [EMAIL PROTECTED] writes:
Rob Although 'foreach' is more useful, I think it's it's far more likely
Rob that someone realized that the two could be distinguished by context and
Rob needn't have different symbols, so the two were made equivalent.
That someone would be one Mr.
Hi all,
I am looking to easily install some modules, like for example
Win32::Clipboard, but they don't show with teh standard modules on
ActiveState's repository.
Are there a couple of better ones I can add?
Thanks for your time
Jim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On Apr 4, 6:41 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
Seth wrote:
I have an existing xml file that I need to display. Perl was
suggested a good way to do that.
I am using XML::Simple. None of the examples use the format that I
have.
Here is an example of what I am dealing with:
use constant PART_NUMBER= 'P/N';
print PART_NUMBER;
The above prints, P/N, as I would expect. Later in the script I
want to access a hash value using the constant like this:
my $part = $parts{ $key }{ PART_NUMBER }; - this doesn't work, but
this does:
my $part = $parts{ $key }{
Dear all,
I'm trying to send email with perl in my application.
The email is encoded with utf8.
The content of the email is good.
But the subject of the email is wrongly shown.
I use MIME::Lite package.
So how can I use utf8 encoding in the subject of my email?
Thanks for any help.
--
To
Hi ,
I got a cgi in perl, in this cgi i use ajax to ejecute a javascript code,
in this code i produce a prompt, and i store the value at the res variable.
now i would like to store this variabe, res into a perl variable ($res),
something like $res=res
How can i do that?
thanks
use MIME::Words qw/:all/;
for example,
$subject = encode_mimeword($subject,'b','gb2312');
On Fri, Apr 4, 2008 at 9:38 PM, kun niu [EMAIL PROTECTED] wrote:
Dear all,
I'm trying to send email with perl in my application.
The email is encoded with utf8.
The content of the email is good.
On Fri, Apr 4, 2008 at 11:42 PM, [EMAIL PROTECTED] wrote:
use constant PART_NUMBER= 'P/N';
print PART_NUMBER;
The above prints, P/N, as I would expect. Later in the script I
want to access a hash value using the constant like this:
my $part = $parts{ $key }{ PART_NUMBER };
I saw many people use CgyWin for unix shell emulator, maybe you can try it.
For me I use VMWare on my WinXP to run linux and Perl.
On Fri, Apr 4, 2008 at 6:04 PM, Jim [EMAIL PROTECTED] wrote:
Hi all,
I am looking to easily install some modules, like for example
Win32::Clipboard, but they
Seth wrote:
On Apr 4, 6:41 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
Seth wrote:
I have an existing xml file that I need to display. Perl was
suggested a good way to do that.
I am using XML::Simple. None of the examples use the format that I
have.
Here is an example of what I am dealing
[EMAIL PROTECTED] wrote:
use constant PART_NUMBER= 'P/N';
print PART_NUMBER;
The above prints, P/N, as I would expect. Later in the script I
want to access a hash value using the constant like this:
my $part = $parts{ $key }{ PART_NUMBER }; - this doesn't work, but
this
- Original Message -
From: Jim [EMAIL PROTECTED]
Newsgroups: perl.beginners
To: beginners@perl.org
Sent: Friday, April 04, 2008 6:04 AM
Subject: PPM Repository
Hi all,
I am looking to easily install some modules, like for example
Win32::Clipboard, but they don't show with teh
Jim wrote:
I am looking to easily install some modules, like for example
Win32::Clipboard, but they don't show with teh standard modules on
ActiveState's repository.
Are there a couple of better ones I can add?
Try:
http://ppm.tcool.org/archives/
and install the libwin32 package.
Jim wrote:
Hi all,
I am looking to easily install some modules, like for example
Win32::Clipboard, but they don't show with teh standard modules on
ActiveState's repository.
Are there a couple of better ones I can add?
http://ppm.tcool.org/
Rob
--
To unsubscribe, e-mail: [EMAIL
yitzle wrote:
Huffman encoding is basically the idea that the more often a symbol is
used, the shorter it should be.
Huffman Coding turns data into a binary sequence. It is an algorithm for
data compression, not simply a notion, and isn't relevant outside that
field (except perhaps philosphy).
Chas. Owens wrote:
On Thu, Apr 3, 2008 at 8:37 PM, Rob Dixon [EMAIL PROTECTED] wrote:
snip
* Note, this is not real Huffman encoding, just Larry Wall's version of
it.
Huffman encoding is a compression algorithm, used in GIF files if I
remember correctly. It's not relevant to
On Fri, Apr 4, 2008 at 7:20 PM, Rob Dixon [EMAIL PROTECTED] wrote:
Chas. Owens wrote:
On Thu, Apr 3, 2008 at 8:37 PM, Rob Dixon [EMAIL PROTECTED] wrote:
snip
* Note, this is not real Huffman encoding, just Larry Wall's version
of it.
snip
from
ken Foskey wrote:
On Sat, 2008-04-05 at 00:37 +0800, Jeff Pang wrote:
On Fri, Apr 4, 2008 at 11:42 PM, [EMAIL PROTECTED] wrote:
use constant PART_NUMBER= 'P/N';
print PART_NUMBER;
The above prints, P/N, as I would expect. Later in the script I
want to access a hash value
46 matches
Mail list logo