On Feb 1, 2008 10:47 AM, Pradeep Mishra [EMAIL PROTECTED] wrote:
hi all
I have been trying to install spamassin using ...perl -MCPAN -e shell
which throws an error
Can't locate CPAN.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
core module).
How could I use this command with the Shell function ?
[1] : http://perldoc.perl.org/functions/localtime.html
[2] : http://perldoc.perl.org/Shell.html
I'm a beginner with perl... :-)
Thanks !
Welcome to Perl.
Best regards,
Adriano Ferreira
--
Shams Fantar (http
On 8/30/07, Peter Scott [EMAIL PROTECTED] wrote:
On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote:
I want all the output plus any error messages to got to a log file. I
used the BEGIN block to direct STDERR into the file:
BEGIN {
open(STDERR, /usr/local/myreports/report.log) ||
On 8/30/07, Beginner [EMAIL PROTECTED] wrote:
On 30 Aug 2007 at 6:32, Peter Scott wrote:
On Thu, 30 Aug 2007 10:32:01 +0100, Beginner wrote:
I want all the output plus any error messages to got to a log file. I
used the BEGIN block to direct STDERR into the file:
BEGIN {
On 8/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hello list,
Just be curious to see how do you guys use Perl for work.Would you be
pleased to give a vote below?
[a] CGI/Web Development
[b] System Administration
[c] mod_perl -- write Apache handler
[d] write commercial products
[e]
On 8/2/07, Brown, Rodrick [EMAIL PROTECTED] wrote:
How can I get the subroutine calling name as a string?
Ie. Sub foo { } I would like to get foo back as a string.
Sub::Identify may be useful.
http://search.cpan.org/dist/Sub-Identify
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On 8/2/07, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote:
Brown, Rodrick wrote:
How can I get the subroutine calling name as a string?
Ie. Sub foo { } I would like to get foo back as a string.
See `perldoc -f caller`
Shawn is absolutely right. The builtin caller is what you need to
get the
On 7/31/07, Johnson, Reginald (GTI) [EMAIL PROTECTED] wrote:
On Jul 31, 1:31 pm, [EMAIL PROTECTED] (Jackson Samson) wrote:
I have downloaded the CGI.pm to my Windows machine. Do I need a C
compiler to build this or can I use ppm install CGI.pm?
Neither. CGI is a core Perl module. Nothing
On 7/23/07, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote:
Chris Pax wrote:
I know that if i use: use lib /path/to/dir works. but when I try to
use a variable it does not work.
here is my code:
@dirs = split /\// , $0;
delete $dirs[-1];
my $runningDir = join /,@dirs;
$runningDir.=/;
use lib
On 7/20/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hey Guys,
I am working on linux (redhat) 1999 version without the xwindows.
I have configured my dns server on this linux box and it works fine for my test
lab network at home. Apache and sendmail are also working fine without any
problem.
On 7/20/07, Chas Owens [EMAIL PROTECTED] wrote:
On 7/20/07, Adriano Ferreira [EMAIL PROTECTED] wrote:
snip
Just adding to what John already said, it hangs because, when used
without arguments like script file names or -e 'print qq{Hello,
world\n}' , it expects the script is coming
On 7/2/07, Gabriel Striewe [EMAIL PROTECTED] wrote:
Dear List,
I wanted to interpolate a function reference in a here doc.
The following works fine:
my $hello = sub {
return hello world!;
};
printf hello $s\n, $hello();
But when I use a heredoc instead, it
to use printf (or sprintf).
Cheers,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 6/11/07, Robert Hicks [EMAIL PROTECTED] wrote:
Dr.Ruud wrote:
Adriano Ferreira schreef:
Definitely go with
my $test = Some::Module-new;
or even with:
my $test = Some::Module::-new();
While I am sure that will work...I have never seen it with parens after
the new.
As the docs say
On 6/8/07, Robert Hicks [EMAIL PROTECTED] wrote:
I see some modules that call new like:
my $test = new Some::Module;
and some like:
my $test = Some::Module-new;
Is there a difference and what is the recommended way?
Definitely go with
my $test = Some::Module-new;
The indirect object
On 6/8/07, Martin Barth [EMAIL PROTECTED] wrote:
Hi,
I know that using 'Here Documents', we can output multiple lines. But is it
possible to run a couple of commands?
$s = qx [sqlplus user/[EMAIL PROTECTED] ENDOFSQL
select 2 from DUAL;
exit
ENDOFSQL];
what do you think about that:
these exporting abilities. But this import
was never called.
require Calculator;
calc-import;
would work. But what you probably want is to use
package Calculator; # in your Calculator.pm file
Cheers,
Adriano Ferreira
P.S. As a stylistical note, usually you provide exporting capabilities
-ASCII/
I learned it existed in the PerlMonks thread RFC: How to unaccent text?
http://www.perlmonks.org/?node_id=609319
when [salva] made this comment
http://www.perlmonks.org/?node_id=609332
Regards,
Adriano Ferreira
Thanks
Andreas
--
To unsubscribe, e-mail: [EMAIL PROTECTED
think you may close the handles explicitly
after the restoration of STDOUT and STDERR.
close OLDOUT;
close OLDERR;
In this case, Perl would see a second use of these handles and will
not complain.
Regards,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
:
http://www.lua.org/lua-l.html (Homepage)
http://bazar2.conectiva.com.br/mailman/listinfo/lua (to join - via
Mailman interface)
Adriano Ferreira
Cheers,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org
On 3/6/07, Tony Heal [EMAIL PROTECTED] wrote:
I am trying to determine how this does what it does.
sub IsLeapYear
{
my $year = shift;
return 0 if $year % 4;
return 1 if $year % 100;
return 0 if $year % 400;
return 1;
}
The binary operator % is the modulo or remainder
On 2/27/07, Jorge Almeida [EMAIL PROTECTED] wrote:
I want to define a hash reference like this:
my $h={
a = 'a',
b = 'aa \
bbb',
};
(Note the string containing escaped newlines.)
Now, the point is that I have the block
a = 'a',
On 2/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
All,
Hi. I have a problem with the below code. I have two strings, $rdns and
$result1. I want to make sure $result 1 is NOT part of $rdns. But the below
fails...thus instead of printing the else part of the if-else-loop. It print
On 2/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Thank you both. I am trying to find out why !~ operator fails. It is due to the
whitespaces. but I am using six to ignore spaces.
It has nothing to do with whitespaces. As Tom said:
On 2/26/07, Tom Phoenix [EMAIL PROTECTED] wrote:
On 2/26/07, jm [EMAIL PROTECTED] wrote:
is there a function, module, script, etc. that converts all uppercase to
proper mixed case. this particular need is for an address list that is all
uppercase
Doing it blindly, can be easily achieved with regexes:
$address =~ s/(\w)(\w*)/\u$1\L$2/g;
On 2/12/07, Sayed, Irfan (Irfan) [EMAIL PROTECTED] wrote:
Hi All,
I need to concatenate specific string for each element in the array. I
tried in the following way with the help of join operator.
foreach (@mail)
{
my $str1=$_;
$str1=$str1 . @abc.com;
@abc.com is an interpolating string,
and tripwire
work as they are or do I need to put the '@domain.com' portion in too? The
domain will never change and I only need to worry about those two addresses
outside of the users.
Adriano Ferreira wrote:
On 2/2/07, Mathew Snyder [EMAIL PROTECTED] wrote:
I have a script which extracts email
On 2/7/07, Sharan Basappa [EMAIL PROTECTED] wrote:
Hi Tom,
What if I wanted to have multiple embedded (and separate) texts embedded
in my program. Are you saying that I can have only one text section and that
should have keyword DATA.
Actually when I wrote example, I assumed that double
On 2/7/07, Rob Dixon [EMAIL PROTECTED] wrote:
Igor Sutton wrote:
Hi fellows,
Dave, you wanted to use
while (1) {
...
the code to be repeated
..
}
The above code could be written like this:
{
...
# the code to be repeated
...
redo;
}
Do you think this is
= $addr-user; # this is casey
Regards,
Adriano Ferreira.
Thanks,
Mathew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
interpreter itself that implements a useful
subset of the language, strong enough to equip the build process with
advanced capabilities. This is a tool for the developers of the Perl
core and not useful outside this context IIRC.
Kind regards,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED
On 1/26/07, Jen Spinney [EMAIL PROTECTED] wrote:
Hello list!
I apologize in advance for not posting a complete sample script that
shows my problem, but I can't isolate it outside of my (rather large)
perl application.
My problem is that I'm hit with a barrage of warnings that tell me I'm
using
On 12/18/06, positive mind [EMAIL PROTECTED] wrote:
In Linux, how do I check if a particular Perl module is installed or not on
my system?
$ perl -MSome::Module\ 99 -e ''
will usually tell you something like
$ perl -MYAML\ 99 -e ''
YAML version 99 required--this is only version 0.62.
BEGIN
On 12/15/06, John W. Krahn [EMAIL PROTECTED] wrote:
Jorge Almeida wrote:
I thought I already knew a few things about Perl, but I just found out I
don't:
#!/usr/bin/perl -w
use strict;
use diagnostics;
my $a=27;
doit();
sub doit{
print $a\n;
}
The
On 12/15/06, Jorge Almeida [EMAIL PROTECTED] wrote:
On Fri, 15 Dec 2006, Adriano Ferreira wrote:
More differences will show up if you use packages. The my() variables
will have the scoping from the point they are declared to the end of
But they can be redefined with my inside a routine
On 12/12/06, Dukelow, Don [EMAIL PROTECTED] wrote:
I'm trying to declare a zero size hash so a sub function can populate it and
be see by all other sub's.
my %loginHash();
my %loginHash;
should be enough.
But the use strict doesn't like it.
It is not use strict that does not like it. It
On 12/12/06, Helliwell, Kim [EMAIL PROTECTED] wrote:
I think you need to do:
my %loginhash = {};
That's not right. {} is a hash ref, not a hash. It stands for a scalar value.
When you do that
my %h = {}
or, for the same result,
my %h = 1;
my %h = abacate;
you end with a hash
On 12/8/06, Charith Hettige [EMAIL PROTECTED] wrote:
Hi All,
I am having trouble uninstalling the current Cygwin installation. Since
there doesn't seem to be an entry in Add/Remove of windows. Please be kind
enough to help me with this.
This list is not about Cygwin. We may be interested in
? Anyone has clues about it?
Adriano Ferreira
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On 11/30/06, Chris Parker [EMAIL PROTECTED] wrote:
while(@numbers = )
{
# Extract widths
@width = split( , $numbers);
Here at this piece of code, @numbers and $numbers are different
variables. And you never assign anything to $numbers. Probably you
want this:
while () { #
On 11/30/06, Chris Parker [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Adriano Ferreira wrote:
On 11/30/06, Chris Parker [EMAIL PROTECTED] wrote:
while(@numbers = ) {
# Extract widths @width = split( , $numbers);
Here at this piece of code, @numbers and $numbers
of code which are not ready yet or
which have been replaced by something else. Depending on the editor
you use and your skills with it, POD may be handier to comment such
blocks.
Regards,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
On 11/28/06, flw [EMAIL PROTECTED] wrote:
Who cabeginnersn help me to explain the reason?
$ perl -e '$_=a11\nb22\nc33\n; print $_, -x15, \n;s/^a.*^b.*/x/m; print'
The problem here is that \m allows ^ to match after any newline
within the string, but does not change . which matches any
On 10/23/06, Romeo Theriault [EMAIL PROTECTED] wrote:
This all works fine, but in
the last step of the program I am trying to get the program to tell
me key's that are unique to only the first hash. No matter what I do
it always prints out all of the values in the first hash, not the
keys that
On 10/23/06, Romeo Theriault [EMAIL PROTECTED] wrote:
Thank you Adriano, that works nicely after I added:
use Memoize::AnyDBM_File;
before that I was getting this error:
AnyDBM_File doesn't define an EXISTS method at
I had not payed much attention to the fact that your code were using
statement in the
for is often used for declaring loop variables or, more generally, for
loop initialization statements. If you don't have these initialization
statements, you may omit it.
Regards,
Adriano Ferreira
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
On 9/12/06, JupiterHost.Net [EMAIL PROTECTED] wrote:
I'm trying to change the behavior of a function (whose use of and call I
have no control over) to avoid some nasty behavior in certain circumstances.
Its easy enough to redefine it but after the hairy part is done I want
to change it back.
On 9/10/06, Jen Spinney [EMAIL PROTECTED] wrote:
On 9/10/06, Dr.Ruud [EMAIL PROTECTED] wrote:
my$mean;mean+=$_/@data [EMAIL PROTECTED];
Don't you need another dollar sign?
my$mean;$mean+=$_/@data [EMAIL PROTECTED];
Where is Rob to tell Dr. Ruud if one must test the code for him after
he
to advocate here. I will be more careful in the next posts.
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On 9/6/06, Michael Alipio [EMAIL PROTECTED] wrote:
I want to adjust the last two digits to less 1:
perhaps something like this.
s/\d+$/(regexp being lookup minus 1/
s/(\d+)$/$1-1/e
is going to work, even though it is convoluted and not robust. For
example, '06.00' will become '06.-1'
--
On 9/6/06, chen li [EMAIL PROTECTED] wrote:
I need a regular expression to process some data but
get stuck. I wonder if anyone here might have a clue.
input:
my $line='group A 1 2 3 4';# separated by space
results:
my @data=(group A ,1,2,3,4);
You barely need a regular expression for
On 9/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi, guys
In a udp socket test routine, I want to write some integers to server in network
order. But unfortunately, my server receive just chars! how can I do?
Take a look at 'perldoc pack'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On 9/7/06, Adriano Ferreira [EMAIL PROTECTED] wrote:
On 9/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi, guys
In a udp socket test routine, I want to write some integers to server in
network
order. But unfortunately, my server receive just chars! how can I do?
Take a look at 'perldoc
Chris,
I found your solution to work alright, with the exception that you
probably don't want to escape | as in
(?:http\|ftp\|file)
but only
(?:http|ftp|file)
So that the test script below succeeds:
use Test::More tests = 3;
{
my $url = ahttp://foo.org//a;
$url
On 8/30/06, Derek B. Smith [EMAIL PROTECTED] wrote:
Why is it so many people on the list are sarcastic???
Many enjoy being that way. Some enjoy helping people at this list and
others, but get tired sometimes and forget they can only ignore what
they thought to be a not-so-clear question and
/2006 which is alright.
Regards,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
*shift' 64.63
64630.00
But I am not sure you would like %12.12f
$ perl -e 'printf %12.12f, 1000*shift' 64.63
64629.9993
Maybe %12.2f
$ perl -e 'printf %12.2f, 1000*shift' 64.63
64630.00
Regards,
Adriano Ferreira
On 8/28/06, Howard, Chris [EMAIL PROTECTED] wrote:
I don't know
is probably at perlfaq5 - but I could not found a
version of Perl with the problem you pointed (the dash of the arrow
missing).
Regards,
Adriano Ferreira.
On 8/24/06, Klaus Jantzen [EMAIL PROTECTED] wrote:
I would like to inform whoever feels responsible for perldoc that the
output of
perldoc
this
for (glob $first.trc.*) {
print FOUND: $_ if /$first.trc.$MACHINE_TYPE/i;
}
Adriano Ferreira
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
($a, $b) = @pair;
my ($u, $i) = unisect(@pair);
print (@$a) U (@$b) = (@$u)\n(@$a) A (@$b) = (@$i)\n\n;
}
Kind regards,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first
or
http://perldoc.perl.org/perlrun.html
You will probably like the -S switch (for finding your script files
via path) and PERL5LIB.
Regards,
Adriano Ferreira
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http
This one-liner works a bit like a (Unix) grep:
perl -n -e 'print if /Test Case/' temp.txt
and is probably efficient enough for most cases.
On 6/7/06, anu p [EMAIL PROTECTED] wrote:
Hi All,
I have a requirement where I need to check if a word
exists in a text file and if so, get the whole
It seems like I did not read enough of your message to give you a
sensible answer to your problem.
# write a function to do what the one-liner did, but stopping at
the first row
sub find_first {
my $regex = shift;
local @ARGV = @_;
while () {
On 6/7/06, Graeme McLaren [EMAIL PROTECTED] wrote:
Hi all, I have a weird error:
Can't locate object method dbh via package em_log at
/path/log.cgi line 15.
line 15 is the second of these two lines:
my $log = em_log-new;
$log-dbh($dbh);
Does your code define a suitable new() ? The bare
On 6/7/06, Graeme McLaren [EMAIL PROTECTED] wrote:
Hi there, thanks for your reply, here is my constructor:
sub new{
my ($class) = @_;
my $self = {
_table = undef,
_id = undef, # this refers to the column named
pkey_updated_record in the log table
_dbh = undef,
Graeme,
(Send your messages to the list beginners@perl.org so that more people
can help you out.)
I still don't know where your problem is. The files you sent look ok,
with some remarks:
em_log.pm should contain the statement package SI::eventmaster::em_log;
rather than package em_log;
The line below was folded, and
$self-{'fookey'} = 'some value here'; #hashref accessible only
within Package Foo;
the Perl interpreter is seeing
within Package Foo;
Outputs:
Can't locate object method within via package Package (perhaps you forgot to load
Package?) at ./myOOP.pl
On 6/6/06, Lakshmi Sailaja [EMAIL PROTECTED] wrote:
Can I include a korn shell script in a perl program?
Not include, but you certainly can execute a shell script from within
a Perl program.
I have done the following but I get a compilation failed error.
abc is the ksh script.
On 6/6/06, Lakshmi Sailaja [EMAIL PROTECTED] wrote:
I wanted to include the shell script, abc, as I want to access a variable.
The shell script, abc, actually takes a value (val) from the user.
I want to use that value (val) in my perl porgram. Is that possible?
Perl may take a value from the
Adding to what Tom said, if you are behind an annoying authenticating
proxy like Squid, you will find that something like this works:
$mech-proxy(['http', 'ftp'], 'http://proxy_user:[EMAIL PROTECTED]:/');
Have fun.
Adriano.
On 6/2/06, Shalaka [EMAIL PROTECTED] wrote:
I've used the
On 4/26/06, Rance Hall [EMAIL PROTECTED] wrote:
@domain = split(' ',$domainlist);
This usage of split only splits at spaces. For example, if $domaintlist contains
'a b c', you will get ('a', 'b', 'c'). It has nothing to do with other
kinds of spaces.
If you meant
@domain = split /\s+/,
got
the tuits to do it.
Regards,
Adriano Ferreira.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
is use
open (TAIL,tail -F $log|) or die can't open pipe:$!;
Regards,
Adriano Ferreira.
On 1/14/06, Jeff Pang [EMAIL PROTECTED] wrote:
I have a log file which is a symbol link to the real logfile,shown as
following:
I have to access this file in perl script with unix 'tail -f
On 1/14/06, Jeff Pang [EMAIL PROTECTED] wrote:
Thanks for Adriano.I have tried the way that mentioned by you,and found it's
no use for me.
should the '-F' option have no effect for symlinks maybe?
Well, that way would be easier if it worked. But I think with some
extra logic you can do it
;
It is in core documentation somewhere, even though I could not locate
it right now.
Cheers,
Adriano Ferreira
On 1/13/06, Gerald Wheeler [EMAIL PROTECTED] wrote:
trying to include the following code with the abc.pl script...
the snippet works in an html/css environment
print EOF;
style type=text
On 1/13/06, Adriano Ferreira [EMAIL PROTECTED] wrote:
It is in core documentation somewhere, even though I could not locate
it right now.
Here it is: try Cperldoc perlop in the section Regexp Quote-Like
Operators, search for the item EOF and everything is explained
there.
--
To unsubscribe, e
On 1/6/06, Sai Tong [EMAIL PROTECTED] wrote:
I have an array of many objects and I want to call a method on
each of these objects and the save the returned values into an array:
my @return_values;
foreach my $retrievedObject (@array_of_objects) {
push (@return_values ,
On 12/30/05, S Khadar [EMAIL PROTECTED] wrote:
#!/usr/bin/perl
use Shell;
...
$dmchk=zless( $dir/$_/foo.gz);
As an aside note, Cperldoc Shell advises against this style [ use
Shell nothing ; ]. Prefer this:
use Shell qw(zless);
so that you know that you are not calling some
On 12/30/05, Robert Hicks [EMAIL PROTECTED] wrote:
Note the leading underscore in the sub name. What does that mean? Is that
like making it private?
Yes. But as a convention: that means: you sensible reader, don't you
try to rely on this function outside of this immediate realm of code.
But you
On 12/30/05, Xavier Noria [EMAIL PROTECTED] wrote:
Even if gzipped files have always more than 0 bytes, wouldn't it be
true than all empty gzipped files have the same size, and that non-
empty gzipped files are greater than that minimum? In this Mac that
size seems to be 24 bytes.
Nope.
On 12/30/05, David Gilden [EMAIL PROTECTED] wrote:
In the Script below the line: last if ($num = 35)
is giving me this error: Use of uninitialized value in int
That's not an error, but a warning. You will find that execution goes
after this.
How do I avoid this error?
@files probably contain
On 12/28/05, Khairul Azmi [EMAIL PROTECTED] wrote:
That one works using a solution
I found on the web but the problem is when I tried to pass the argument to a
function declared in the same file, the argument somehow became null.
sub sample_function {
print go in $_\n; -
On 12/28/05, Umesh T G [EMAIL PROTECTED] wrote:
I need to put each letter from a string to an array.
The usual way to tear apart a string into an array with characters is
@chars = split '', $string;
It is documented at Cperldoc -f split.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
I am curious what the reasoning behind the first element of
something being zero is ($array[0]). I know I've read it before, but
I can't remember. Thanks!
Using indices 0 .. n make it possible to work with them like offsets
from the beginning of the array. More important from a C point of
On 12/26/05, Robin Houston [EMAIL PROTECTED] wrote:
+# Check that constant overloading propagates into evals
As a further confirmation of the fact, the following one-liner (using
bigint and eval with strings) that used to output
$ perl -Mbigint -e my $x = eval '1+2'; use Data::Dumper; print
On 12/23/05, Rafael Morales [EMAIL PROTECTED] wrote:
I need to send an email to some clients, so I need to know if their mail
client can accept html format or just text format. How can know that ???, I
think that there is, some cpan module to do that however I haven't found it.
When you send
On 12/22/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
How can I check inside a script to see if a file has already been
opened early and is still open? Does the perl interpreter keep track
of that kind of stuff.
Maybe what you want is the function Copenhandle from CScalar::Util
module. See
On 12/22/05, Ken Perl [EMAIL PROTECTED] wrote:
Is the MIME::Base64 support unicode?
MIME::Base64 supports conversion of binary data into a limited character set,
convenient for transmission by e-mail and other means that prefer pure ASCII
data.
I am trying to use the module to encode the a
On 12/15/05, Beast [EMAIL PROTECTED] wrote:
In perlmodlib :
varsPredeclare global variable names (obsolete)
If this is obselete then what is the newer version of predeclare global
variables?
Replace things like
use vars qw($FOO)
with
our $FOO;
(unless you need to assure
On 12/5/05, Jennifer Garner [EMAIL PROTECTED] wrote:
As we know, $::{sym} == *main::sym, it's a typeglob.
but what is **main::sym? and the same,what is *{$glob}?thanks.
**main::sym is a syntax error, but *{*main::sym}==*main::sym.
But don't be fooled by the equality $::{sym} == *main::sym. It
On 12/5/05, Jennifer Garner [EMAIL PROTECTED] wrote:
print ${*{$::{sym}}{HASH}}{name};
How to analyse the last sentence of that code?Thanks.
From perldoc perlref
7. A reference can be created by using a special syntax, lovingly
known as the *foo{THING} syntax. *foo{THING}
What's the rationale for hardwiring the Perl executable pathname into
the Perl interpreter? It is some oddity to guarantee Perl can find its
library via a relative path? Is it a safety thing?
Adriano.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 12/2/05, Chris Devers [EMAIL PROTECTED] wrote:
Historically, Unix users could depend on a copy of Perl in /usr/bin from
their vendor, and maybe a custom-installed one somewhere like /opt/bin
or /usr/local/bin. With that in mind, using one of those paths usually
would do something useful.
On 12/2/05, Chris Devers [EMAIL PROTECTED] wrote:
But anyway, yeah. In general, you can't depend on things working
consistently if you just start randomly moving around compiled programs
and libraries. Sometimes it won't matter, but other times, the results
just won't be predictable.
Ok. I
On 12/2/05, Brent Clark [EMAIL PROTECTED] wrote:
Anyone know if theres an archive link for this mailing list.
You can find The Perl Mailing List Database at
http://lists.perl.org
and from there
http://lists.cpan.org/showlist.cgi?name=beginners
where you will find the
On 12/2/05, Chris Devers [EMAIL PROTECTED] wrote:
My understanding is that the Python idiom is to avoid putting the full
path, in favor of something like
#!/usr/bin/env python
#!env python
on grounds that Python may not be quite as common, but you could depend
on the `env` command
On 11/3/05, JeeBee [EMAIL PROTECTED] wrote:
Thank you, John!
I see the limit is 32 bits now.
I just added 'use bigint', how easy!
Further, I was wondering about why you said I wasn't just multiplying by
2 using $p=1. Isn't it exactly equal to $p*=2 ???
It is equal just up to the moment the
On 10/28/05, Bowen, Bruce [EMAIL PROTECTED] wrote:
The data may look like this:
$DD = 5000|SIHHTEXT
I've tried $d = index($DD, m/[^\d]/);
$d = index($DD, /[^\d]/);
$d = index($DD, [^\d]);
Cindex doesn't work with regexes. But you can use Cpos
$ perl -e '$DD =
On 10/18/05, Gert [EMAIL PROTECTED] wrote:
in the example below I am using Digest::MD5 for computing the md5-checksum
for a string. The first solution uses the function md5_hex, the second way
uses the OO method hexdigest. The results are not equal. Shouldn't they be
equal? I think they
On 10/11/05, Dan Klose [EMAIL PROTECTED] wrote:
I would like to be able to automagically submit a form to a server.
Take a look at WWW::Mechanize
http://search.cpan.org/dist/WWW-Mechanize/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1 - 100 of 108 matches
Mail list logo