Can anyone recommend a site where I can hire a competent Perl Tutor? I
wish this info is readily available on perl.com but it isn't. And
searches on google and craigslist is pretty disappointing.
Anyway, I don't want to spam the board so I'd appreciate it if you
could email me
Hi, I'd like to narrow the previous Expect(tcl) question so that an
answer can be extracted:
Perl vs Expect(tcl) question again.
Here is a specific Expect example:
I have a release engineering build script that performs the following:
Launch masterbuild.tcl (expect script) from WinNT s
Excellent info coming in, so far.
If its true that we have to use two versions of Perl Expect.PM
(ActiveState) and Perl Expect.PM (Unix)...
then wouldn't that pose double script maintenance issues? My
Expect(tcl) script is simplified and centralized to one file. Its
capable of switching
I'm pretty much a newbie and should be reading more than contributing, but
one of my professors insisted that we troubleshoot all of our classroom
assignments by running our Perl programs from the command line. I've
continued this practice in my post-classroom life.
Keith
you can just do this before you spell check.
{
s/./ ./g; # Would make Test. Test .
s/,/ ,/g; # etc. for other punctuation marks.
spellcheck
s/ ././g; # Make Test . back to Test. after spell check
processes all the garbage
> above and below the actual working area of the file.
>
> I would appreciate any help in resolving this issue as well as any
> comments on better coding practices.
>
> Regards,
>
> Jack
>
>
> #!/usr/bin/perl
> #
> # cur2sql.pl
&
yeah just type : 'free'
Ryan
On Tue, 19 Jun 2001, Chris Hedemark wrote:
> Howdy,
>
> I'm tearing through my O'Reilly books and the CPAN search trying to find a
> module or built-in function call that will let me get statistics back from
> the system regarding memory. I'm trying to find:
>
> 1)
When you do : foreach $line (<>){
that will print the last line in <>
rename $line in the foreach statement to something different,
RYan
On Tue, 19 Jun 2001, Bob Mangold wrote:
> I may have a bug somewhere in my code, but I can't find it. Before I look again
> though please answer this for
Hi,
I would like to know if with a perl script you can get the size of a file ?
I need to get all the size of 250 files on 250 computers ...
thanx
To get the status message from a http request from lwp:
my $res = $ua->request($req);
my $errorCode=$res->status_line
Economic perl programming and perl debugging http://www.fluxcent
I propoused thi logo for learn.perl.orgl, if you liked please
tell me so.And vote on this list.
http://perl.fluxcenter.com/images/learn_perl4.gif
The logo is the same size as the 'Download Perl'
Button, is very fast. And mathes desing of learn.perl.org
The Brown and green are are to
I want to do this :
I have a file where there are 256 servers names, one server name per line.
I want to read all lines to take the names of all servers to check the size of
some files ...
I tried this but it's not working like I want .. :
$serveur="c:\\perl\\bin\\liste.txt&qu
En réponse à Aaron Craig <[EMAIL PROTECTED]>:
> I would do something like this:
>
> use strict; # very important, and saves a lot of headache!
>
> open (SERV, "c:\\perl\\bin\\liste.txt") || die "Could not open
> liste.txt:
> $!"; # added
I want to do this :
- get the size of some files with stat
- compare these sizes with some variables
- copy the "good" files if the size doesn't match ...
hi,
I want to do this :
i have some servers where i want to check if some files exists and the user
must put the all path with the name of the file ...
use strict;
#that's the file where my servers are ...
open (LISTESERVEUR, "c:\\perl\\presence\\listeserveur.txt") || die &
Hi,
I want to remplace all the word "html" in "php" in some web pages ...
I tried this but nothing is happening :
open (TRANS, "c:\\test\\test.txt");
@transformation=;
foreach $ligne (@transformation)
{
chomp($ligne);
$transform=$ligne;
$transform=~s/html/php/g;
};
close (TRANS);
Hi all,
Need a little help on summarising 2 different tables into 1, based on a particular
field.
The 2 tables (they are actually content from a log file) look like the follow :
Table #1
1006788900 198 36
1006788600 29 35
1006788300 18 75
1006788000 19 65
1006787700 42 37
10067874
Hi all,
Thanks for those who replied to my posting appreciate all the help
given. :)
Based on the code written by John (thanks a lot), I would like to ask a
further question :
John's code ==>
#!/usr/bin/perl -w
us
Hi guys,
I encountered this dereference problem on hash-of-lists tables. Although I have
managed to solve the problem thru trial and error, I need someone to explain to me
what was wrong exactly. I tried searching the web for some info but couldn't find any.
The problem started when I tried to
Hi ,,,
this my first time i write to you :)
i have the uncluder script
$file = $ENV{'QUERY_STRING'};
print "Content-type: text/html\n\n";
if($file eq "") {
print "document.writeln('
Includer Error: No File Specified.
');\n"; print "document.writeln('Script by SmartCGIs.com
<%5C%22http://www.sm
-f3
I get the desired output, to a point, but I'd like to do it all in perl
Thanks for your time.
Alan.
#!/usr/bin/perl
#
#
# Build Initial list and put into array.
@serverlist = `/usr/bin/wget -q -O - http://www.anyserver.com`;
for ($index = 0; $index <= $#serverlist; $index++) {
i need to get that data into a global array
}
honestly i am not that good at perl i have been exploring perl
thanks you
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
> I have used libpcap to capture data using Net::Pcap module ... and now
> ... i have been stuck with decoding... here is the code that i have
> used http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/eg/pcapdump
> #!/usr/bin/perl use strict; use Data::Hexdumper; use File::Basename;
This is normally the basic when i added a xml file to the code
Code ::
/use XML::XPath;
use XML::XPath::XMLParser;
use Data::Dumper;
# create an object to parse the file and field XPath queries
my $xpath = XML::XPath->new( filename => "test.xml" );
print Dumper ($xpath) ;/
OutPut ::
/$VAR
I tried to use LibXML .. when i never to the correct libXML read file
... when i tried to use the LWP download which is an XML .. how to use
it please help me ...
/use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $response =
$ua->get("http://www.perlmonks.org/?displaytype=xml;node_id=3989";);
i have tried to use the LibXML modules to xpath a document but its
getting complicated ..
i have seen this example over forum here .
use XML::LibXML ;
use strict;
use warnings;
{
my $xml = <<'XML';
Hello world!
XML
my $parser = XML::LibXML->new;
my $doc
hi,
it got some error while adding data into sqlite through Perl script on
Apache ... script can able to read the file but not able to write .. I
have set the permissions of sqlite file to 666 ..
when i ran the script from local user its working fine .. its able to
write the data into db
when i
On 07/24/2010 08:53 AM, Owen wrote:
>
>> hi,
>> it got some error while adding data into sqlite through Perl script on
>> Apache ... script can able to read the file but not able to write .. I
>> have set the permissions of sqlite file to 666 ..
>>
>> wh
On 07/24/2010 10:48 AM, Owen wrote:
>
>> On 07/24/2010 08:53 AM, Owen wrote:
>>
>>>
>>>> hi,
>>>> it got some error while adding data into sqlite through Perl script
>>>> on
>>>> Apache ... script can
Cheers and thanks in advance for you help. I have a routine intended
to purge duplicate emails from a list. The code below is not working.
I remember seeing something like... foreach $email(@emails, @emails2))
{ etc ... but I'm lost. Any help is appreciated.
sub purge
{
open (LIST, "$list") or erro
h
};
return;#(\%session);
}
1;
#!/usr/bin/perl -w
#
# Program:
# Author: Babale Fongo
# Date:
can someone give a name of any image (JPG or GIF) editing / creating module, which
allow to create images to display on web pages on the fly by CGI scripts.
Rakhitha M. Karunarathne
Trainee Software Developer,
IFS - R & D International,
501,Galle Road ,Cololmbo-6, SRI LANKA.
Tel +94 (011)-2-364-
I wrote some code to identify and print HTML tables below:
use strict;
my @table;
my $logfile;
my $counter;
my $inc;
my @array;
die "You must enter an argument. \n" if $#ARGV <0;
$logfile = chomp ($ARGV);
foreach my $line(<>){
if ($line =~ /(TABLE)(.+)/) {
$inc++;
Hi,
How do I best test for a valid host name? My script will read from a
file which contains IP addresses and/or dns name, so I'm trying to sort
out valid IP addresses or host name (using regex). For some reason, my
regex fails to match host names with one or more dash (-). IN the
example below,
Your regex did not allow (w2k-server-proxy2) a valid dns name.
I now see how complex it is to match valid ips or dns names.
The more I try to modify the regex to perfection, the more I see
hopholes. So I think it is not worthwhile spending lot of time on this
regex. My script does more than patte
Hi,
I installed few perl module locally and I
try to install another one which depends
on the previously installed ones (locally)
but I get the warning that these modules can not
be loaded
example:
billmax:~/src/perl/XML-DOM-1.43$ perl Makefile.PL
PREFIX=~/usr/local/lib/perl5
Checking if your
Can anyone point out what is uninitialized in line 162?
my @resolved = ();
foreach (@dns){
my $ip = gethostbyname($_);
my ($a,$b,$c,$d);
my $x = join (".", (unpack('C4',$ip ))); # line 162
$x ||= "";
push (@resolved, join(" => ", $_,$x));
}
Thanks
--
To unsubscr
How do I best compare mtime of several files. I have a script for making
daily backups into a given directory. Now I want to modify it to
delete old backups if the total exceed cetain number.
The idea was to compare the mtime of all file to figure out old files to
delete, but somehow I think it
#!/usr/bin/perl -w
use strict;
#use diagnostics;
my $dir = "testdir";
opendir (DH, "$dir") || die "Could not open $dir: $!\n";
my @files; my $keep = 7;
while (defined(my $file = readdir(DH))){
next if $file =~ /^\.+$/;
push (@files, $file);
}
# Skip the
Hi.
I would like to search a scalar variable and have the output to another
scalar. For example:
$test = "This is some test data";
I want another scalar, $regex to hold the output of a regular expression
lookup against $test.
So something like this:
$regex =~ /test/ running against $test. Is
use strict;
use warnings;
use YAML;
use HTML::Tree;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $response =
$ua->get('http://www.raaga.com/channels/hindi/moviedetail.asp?mid=H002927');
my $content1 = $response->content;
my $tree = HTML::Tree->new();
$tree->parse($content1);
my $article = $
I know that under Solaris 2.6 that a process couldn't hold more than 256
file descriptors, but that restriction was lifted in Solaris 7 and Solaris
8.
Using ulimit -n 1024 and the pfiles command, I can see that the process
running this particular Perl script in question has a 1024 limit bu
Is there a limit to the number of children in Perl?
"Ahmed Moustafa" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Tagore Smith wrote:
>
> > Ahmed Moustafa wrote:
> >
> >
> >>So, how can a new diff
Hi All.
I want to download historical stock financial data (EPS, growth, sales revenue
etc.) from the web. My intention is to populate a MYSQL database with these
values and then perform a series of calculations against the database for my
personal investing. A sample of the data I want to ret
Many thanks for the very helpful comments from Andrew and Andy. For the first
time, I have a clear idea of what local and auto flushing are doing for me. I
know I’d get educated here!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.or
ent_id}; # Impose lower case
>>$student_id =~ s/\s//xmsg; # Remove whitespace
>>
>>$student_id =~
>>m{
>>\A([a-z]+) # match and capture leading alphabetics
>>(-) # hyphen to separate surname from student numbe
Many thanks to Shlomi and Uri: as always, you’ve greatly boosted my
understanding of Perl! — Rick
> On Jul 4, 2018, at 9:35 AM, Shlomi Fish wrote:
>
> Hi Rick,
>
> On Wed, 4 Jul 2018 09:16:19 -0500
> Rick T wrote:
>
>> The following line works, even though I
fically didn't want one. Smacks of cargo cult but I'd never
> argue with him.
>
> On Fri, Jul 27, 2018 at 1:37 PM, Rick T <mailto:p...@reason.net>> wrote:
> I tried to implement some advice about slurping that I read on this mailing
> list (using local) but canno
ng to wean myself from CGI.pm, an easy task for most of you, but I
>> am a beginner. The code below works, but that does not mean it always will or
>> that it cannot be improved. I found the main part of this in CGI Programming
>> with Perl, which is 18 years old, and I’ve given up hop
);
>
> If only there were 'strict' and 'warnings' for Template! :-)
>
> Andrew
>
> On Sun, Oct 28, 2018 at 8:52 PM Rick T <mailto:p...@reason.net>> wrote:
> As a novice in perl I realize that it’s a bit presumptuous for me to attempt
> references and
tunately I’m beginning to get the hang of Template Toolkit, and
>> I may need it for more complex situations that come up. Switching from
>> HTML::template this year was a challenge, and I had to rewrite a lot of my
>> perl to go with it. I know that most perl people are good at u
ty reading logs to figure out
> what is wrong, and what to do about it, but for well maintained
> packages in a Unix-like environment that is rare in my
> experience..
>
> You can read about cpanm and how to install it from the Git repo
> readme:
> https://github.com/miyagawa/cpanm
I have this perl script which is taking value from an external appliaction
and then after processing it is passing back a value to same application.
But I was not able to figure out how can I define the variablemy $path
(which is taking value from external app). what should be the syntex.
Can
Dhanashri/ Chris
Yes!! exactly that is what I am trying to do. I am sorry for not making it
clear before.
here is the true picture. I have an APP which can run a perl script but just
before running the script I have a variable in that app which is holding a
value let say "c:\documents\te
Hello Listners,
I am totally novice in perland I need help with that script.
what can be the syntex of assigning a variable (my $path) in perl which is
taking value (for example c:\documents\script.txt) from an expternal APP.
The script will actually parse the my$path value (C:\documents
Jeff,
Thanks a lot for your reply. Acutally external APP was passing value to
command prompt so the first option did work.
"Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Jul 22, Perl said:
>
> > what can be the sy
I am new to perl so I need some help from the list with this script. It
takes a value from command line and then returns afters processing.
For example, If value is "c:\projects\test 2005.txt" the script will returns
it as "test" (actually omitts any space in the directory o
ame of file.
Here is the script
#!/usr/bin/perl
# file: basename.pl
use strict;
use File::Basename;
my $path = $ARGV[0];
my $base = basename($path);
my $dir = dirname($path);
print STDOUT $base;
Any help/suggestion will be appreicated.
Thanks a lot.
--
To unsubscribe, e-mail: [
Hi,
I'm trying to retrieve a list of computer names using net::ldap, but my script
returns no values. It's my first time working with the protocol, so I can't
figure out why it doesn't work. I checked the docs several times, but the ldap
filter usage is still not clear.
Can anyone point out h
On Tue, 2006-04-04 at 12:52 +1000, James Turnbull wrote:
> James Turnbull wrote:
> > Hi
> >
> > Anyone know of a way to create a loop (or something similar) that
> > automatically schedules the execution of a sub-routine periodically
> > from within a program, for example execute check() every 60
Is there a nice clean perl way to test to see if only one key of a hash
has data?
%some_hash = ( key1 => 1, key2 => 2 ); should fail the test
%some_hash = ( key2 => 2 ); should pass the test
%some_hash = ( key1 => 1 ); should pass the test
Thank you
--
To unsubscribe, e-mail: [EMA
On Wed, 2006-04-05 at 09:35 +0800, Jeff Pang wrote:
> Hello,
>
> [EMAIL PROTECTED] ~/app]$ perl -le '%some_hash=(aa=>'bb');scalar keys
> %some_hash == 1 ? print "true" : print "false"'
> true
> [EMAIL PROTECTED] ~/app]$ perl -le &
#!/usr/local/bin/perl
write_function1("first");
print auto_function(), "\n";
# This will print:
# auto_function first
write_function1("second");
# How would I undefine the autoloaded version of auto_function?
print auto_function(), "\n";
# This will pr
e, but pretty good.
>
>
>
> Mike
>
>
> On 7/1/23 13:49, Rick T wrote:
>> My web hosting company is closing business, and I less than two weeks to
>> move my five sites to another host. All of these use perl. If you have
>> experience with a host that suppo
ne or both likely arrived at
>> webmas...@hostgator.com <mailto:webmas...@hostgator.com>.)
>>
>> I am not trained in computer tech; I’m just a 78 year old high school
>> teacher who bought a few books on perl, so I don’t really understand
>> how to fill in the many
ot; . $smtp->message();
>> $smtp->data() or confess "SMTP data: " .
>> $smtp->message();
>> $smtp->datasend($theBody) or confess "SMTP datasend: " .
>> $smtp->message();
>> $smtp->dataend()
How do I pass a null variable as an argument? Sometime I may want a
wrapper sub as below:
Example,
...
sub procName
{ my $fname = $_[0];
my $lname = $_[1]];
}
my procByLastName{ mySubA(null, "doe"); }
...
This is the error message:
Bareword "null" not allowed while "strict subs" in use
thanks
thanks. it works!
-rkl
> Try 'undef'.
>
> eg. my procByLastName{ mySubA(undef, "doe"); }
>
> On Fri, 2003-10-10 at 16:39, [EMAIL PROTECTED] wrote:
>> How do I pass a null variable as an argument? Sometime I may want a
>> wrapper sub as below:
>>
>> Example,
>> ...
>> sub procName
>> { my $fname =
here's the rules:
starts with alphanumeric
4 chars long
require one period
/^[a-zA-Z][\w\-\.]{3,}$/
I think my regex is not doing the required period.
thanks,
-rkl
-
eMail solutions by
http://www.swanmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTE
> /^[a-zA-Z][\w\-\.]{3,}$/ && /\./
Matches more than 1 period. I MUST have 1 and ONLY 1 period. Also, can I
fit it on one line? I couldn't doit.
sub isValidDomain
{ return shift =~ /^[a-zA-Z0-9][\w\-\.]{3,}$/ }
---
> How about something like:
>
> /^[a-zA-Z][\w\-\.]{3,}$/ && /\./
>
> On Fri, 200
I couldn't get it to work. Will the sub run as is? Is the :alpha: suppose
to be there or replace it?
> On Thu, Oct 09, 2003 at 11:58:31PM -0700, [EMAIL PROTECTED] wrote:
>> here's the rules:
>> starts with alphanumeric
>> 4 chars long
>> require one period
>>
>> /^[a-zA-Z][\w\-\.]{3,}$/
>
> I wou
This is not working as I expected:
if(validate('abc.com'))
{ print "true"; }
else
{ print "false"; }
-rkl
> On Fri, Oct 10, 2003 at 12:49:51AM -0700, [EMAIL PROTECTED] wrote:
>> I couldn't get it to work.
>
> Whoops -->
>
> sub validate {
> local $_ = shift;
> return( length == 4 and
>
Good info.
thanks,
-rkl
> Hi,
>
> [EMAIL PROTECTED] wrote:
>> How do I pass a null variable as an argument? Sometime I may want a
>> wrapper sub as below:
>>
>> Example,
>> ...
>> sub procName
>> { my $fname = $_[0];
>> my $lname = $_[1]];
>> }
>
> Alternatively, you could write either
>
> my
> /^[a-zA-Z][\w\-\.]{3,}$/ && /\./
The above matches more than 1 period.
I MUST have 1 and ONLY 1 period. Also, can I
fit it on one line?
this doesn't work either
sub isValidDomain
{ return shift =~ /^[a-zA-Z0-9][\w\-\.]{3,}$/ }
thanks
---
> How about something like:
>
> /^[a-zA-Z][\w\-\.]
Does declaring at the top or the bottom matter?
thanks
-
eMail solutions by
http://www.swanmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Ok - I got it to work by changing the line to length >= 3
If I could push the rule a little further, a new rule added is that an
alpha char a-Z MUST be after the period.
thanks
> On Fri, Oct 10, 2003 at 03:11:52PM -0700, [EMAIL PROTECTED] wrote:
>> This is not working as I expected:
>>
>> if(v
rules:
starts with alphanumeric
3 chars long
require ONLY one period
require alpha after the period
/^[a-zA-Z0-9][\w-].[a-zA-z]/ #but now working
sub validate {
local $_ = shift;
return( length >= 3 and
tr/.// == 1 and
/^[[:alpha:]]/ and
/[a-zA-Z0-9].[a-
The regex below is working for after the period. The part in fron is not
working. It is requiring atleast 2 chars before the period which is not my
rule. the rule for the front part:
start with [a-zA-Z0-9]
chars following is [\w-] BUT IS OPTIONAL
/^[a-zA-Z0-9][\w-]\.[a-zA-z]+$/
I think the regex
The regex below is working for after the period. The part in fron is not
working. It is requiring atleast 2 chars before the period which is not my
rule. the rule for the front part:
start with [a-zA-Z0-9]
chars following is [\w-] BUT IS OPTIONAL
/^[a-zA-Z0-9][\w-]\.[a-zA-z]+$/
I think the regex
So, would this be it for the optional?
/^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/
thanks
> --On Friday, October 10, 2003 17:45 -0700 "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>
>> start with [a-zA-Z0-9]
>> chars following is [\w-] BUT IS OPTIONAL
>>
>> /^[a-zA-Z0-9][\w-]\.[a-zA-z]+$/
>>
>> I think
Great! Final verification question. Atleast for now :)
Do I need to use delimiter for a hyphen?
/^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/
or
/^[a-zA-Z0-9][\w\-]*\.[a-zA-z]+$/
thanks
> --On Friday, October 10, 2003 18:21 -0700 "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>
>> So, would this be it for
Does the semicolon behave any differently for a return test statement?
Example,
sub validate
{ return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ }
or
sub validate
{ return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/; }
thanks
-
eMail solutions by
http://
own the
> road:
>
> #!/usr/bin/perl -w
>
> use Date::Manip;
>
> my ($day, $mnth, $yr);
> my $date = DateCalc("today","- 1day");
> ($yr, $mnth, $day) = ($date =~ /(\d\d\d\d)(\d\d)(\d\d)/);
> print "Yesterday was $mnth/$day/$yr\n";
>
>
Can someone help me with where to put the Date.xs file?
I just downloaded the Class-Date-1.1.7.tar.gz.
I figured out where to put the 2 files in /usr/lib/perl5/5.8.0/Class:
- Class::Date.pm
- Class::Date::Const.pm
- Date.xs -where shoud it go?
I ran th test in the t directory which look like a
Can someone help me with retaining the precisions when they are zero?
ie -
$f = 9.00
$z = $f;
print $z; #result in 9 - bad I want 9.00
$fx = 9.25
$z = $fx;
print $z; #result in 9.25 - good
I can but don't want to use a sub like itoa. Is there a better way to
convert to string?
$z=itoa($f);
pri
Can someone show me how to determine which button the user clicked?
use CGI;
$cgi->param did not contain the action parameter.
I want to determine if the user click the LEFT or RIGHT button:
...
...
thanks
-rkl
-
eMail solutions by
http://www.swanmai
thanks
> On Tue, 14 Oct 2003 02:35:02 -0700, perl wrote:
>> Can someone show me how to determine which button the user clicked?
>
> This hasn't all that much to do with Perl, really.
>
>>
>>
>
> Name your input fields. For example something like
sitting in my tmp dir. I looks like a C type of file.
So, please tell me how to install it.
fyi, I've never installed a cpan or any perl package, if there is such a
thing.
thanks,
> [EMAIL PROTECTED] wrote:
>
>> Can someone help me with where to put the Date.xs file?
>>
&g
Can someone shorten this upper routine?
sub toUpper
{ my $z = shift;
$z =~ tr/a-z/A-Z/;
return $z;
}
Also in a slightly different scenario, how can i change the value of the
parameter itself with a sub.
$a="ca";
toUpper($a); #change the $a value itself
print $a; #I want it to print "CA"
I like that - lc() and uc()
Hmm... I wonder why it is not in the orielly book?
thanks,
-rkl
> On Tuesday, October 14, 2003, at 05:59 PM, [EMAIL PROTECTED] wrote:
>
>> Can someone shorten this upper routine?
>>
>> sub toUpper
>> { my $z = shift;
>> $z =~ tr/a-z/A-Z/;
>> return $z;
>> }
>
> Yes,
Great stuff everyone!
Some of it is still greek to me ;)
here's what I got to work for me:
#!/usr/bin/perl
my $a="aBe";
my $b="bOb";
my $c="cAb";
aUpper($a);
bUpper($b);
cUpper($c);
print $a . " " . $b . " " . $c . "\n";
#
THanks alot for the install info. But I would like your opinion for the
following questions:
1 - Do you think that it will work without installing the XS? It seems to
be working fine but it is giving me a warning message all the time.
2 - DO I need to worry about it messing anything (kernel/perl
Can someone hlpe me clean up this trim?
Rule: remove all trailing blanks and newline/LF
Do I need a chomp here somewhere?
sub trim
{ my $z = $_[0];
$z =~ s/^\s+//;
$z =~ s/\s+$//;
return $z;
}
thanks,
-rkl
-
eMail solutions by
http://www.swanma
Win32 -- see below. There
> should be no problem installing the module from sources since it will be
> installed in a way that does not conflict with any other modules, and
> loading its lib will only add uniquely identified functions to the
> runtime perl process so they won't be mista
Your response is great!
Being new to the environment, simple and fundamental things can be
frustrating. Your step-by-step instruction not only made it possible to
install but it gave me a clue into understanding how the perl/cpan are
structured/organized.
I just have a follow-up question. Is
> [panda]$ perl -MDate::Class -le 'print $INC{"Date/Class.pm"}'
Do you think you meant this?
> [panda]$ perl -MClass::Date -le 'print $INC{"Class/Date.pm"}'
thanks
---
> [EMAIL PROTECTED] wrote:
>
>> I downloaded the t
> On Tue, 14 Oct 2003 19:26:50 -0700, perl wrote:
>> Can someone hlpe me clean up this trim?
>
> What do you actually mean by "clean up"? Make the code shorter and,
> maybe, more obfuscated? Why?
--
- more shorter - Yes
- more obfuscated - h
Can someone show me how to make this compute?
my $a=2;
my $b=3;
my $oper="+";
my $c = $a $oper $b;
where $c would have a value of 5.
thanks,
-rkl
-
eMail solutions by
http://www.swanmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
thanks
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Friday, October 17, 2003 3:54 PM
>> To: [EMAIL PROTECTED]
>> Subject: making a variable execute
>>
>>
>> Can someone show me how to make this compute?
>>
>> my $a=2;
>> my $b=3;
>> my $oper="+";
>>
How can I convert it to a readable date?
$now=time;
print $now return 1066442632
I had tied perldoc time but it says:
No documentation found for "time".
thanks,
-
eMail solutions by
http://www.swanmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED
1 - 100 of 659 matches
Mail list logo