On 17 Nov 2002, Steve wrote:
> Hi everyone, for some reason I can't seem to do basic math in this bash
> script I'm creating for a class I'm taking. Here's my code
>
> #!/bin/bash
> isec=`date +%s`
> thisec=$isec*$isec-$isec
>
> I'm just getting the date in seconds, then trying to get a sort of
>
On 15 Nov 2002, Matt Simonsen wrote:
> I've tried using DB_File open a hash and write a hash of hashes to disk,
> but this failed. I read in Perl Cookbook to "just use it as a regular
> hash" but from what I can tell this is not possible when speaking of
> complex structures like a hash of hashes.
On Sat, 2 Nov 2002, montana wrote:
> I know this is simple and I'm probably overlooking something in the
> tutorial.
>
> How do I get perl to download the source code of a webpage so that I
> can do some parsing and other things to the text?
Try:
use LWP::Simple;
my $contents = get("http://www.
On Tue, 11 Jun 2002, A Taylor wrote:
>
> $rank = $sth1->fetchrow_array();
>
> Now, my question is this: is this the right way to retreive just 1 record,
> using fetchrow_array(); ??? or is there a more acceptable way. This does
> work, its just the 'array()' part is making me a little uneasy.
>
On Tue, 12 Feb 2002, Kevin Butters wrote:
> Beginner question:
>
> ..
>
>
> I have an array that I want to insert elements into. I
> want to insert elements at specific points in the
> array.
>
> Example:
>
> use strict:
>
> @week = ("Monday", "Wednesday", "Friday");
>
> I want to expand the ar
%ignore = map { $_ => 1 } @ignore;
@diff = map { $a{$_} ne $b{$_} }
grep { !$ignore{$_} } keys %a;
@diff will end up with a list of key/value pairs of %a that are
different from %b, excluding those of %ignore.
note: this is untested.
Chris
On 7 Feb 2002, Chas Owens wrote:
> I have t
Whenever I've had to execute system or shell commands, I use the
backtick operator, the system command, or filehandle half-pipes (or
whatever they are called :). And I've always seen these recommended
whenever someone asks how to do that.
But recently, I saw the use of the Shell.pm module:
use
On Wed, 6 Feb 2002 [EMAIL PROTECTED] wrote:
> I understand how the system command works. I understand the
> difference between system() and backticks. My question is this:
> I want to make a call to an external program and I want the output
> printed to the command line as it is processing, BUT
I'm not well versed on the versions of Perl, but I don't think that was
a particularly bug-free version. I would recommend upgrading to at
least 5.005_03
Chris
On Wed, 30 Jan 2002, Nikola Janceski wrote:
> I have two versions of perl (5.004_04, and 5.6.1)
>
> it seems the older one doesn't l
On Fri, 18 Jan 2002, [iso-8859-1] amrit kumar wrote:
> hi,
>
> what i want to proove is...supposer that i assign an
> array @a = (1,2); and then i define another array @b
> which is equal to @a.I have to proove that this is
> done by assigning a copy of array @a to @b rather than
> by refere
On Wed, 16 Jan 2002, Scott Lutz wrote:
>
> $DOM_NAME, my $TLD) = split(/\./, $domain);
> creates two variable out of an inputted domain name,
>
> until this comes along:
> domainname.org.uk
>
> which it interprets as :
> $DOM_NAME = domainname
> $TLD = org
>
> so is it possible
On Fri, 11 Jan 2002, Pieter Blaauw wrote:
> Hi guys
>
> How would I do the following. Platform is a Red Hat 7.2 Linux box with
> Pine 4.44 as my mail client. Now pine stores all your mail in the usual
> /var/spool/mail/
>
> Can I use perl to extract all the mail from 2001 into another big file
>
On Thu, 10 Jan 2002, Christopher Solomon wrote:
>
> On Thu, 10 Jan 2002, zentara wrote:
>
> > Hi,
> > I'm trying to find all .so.xxx files on my system.
> > Eventually I want to do things with them, but for
> > now I just want to identify them.
> >
&
On Thu, 10 Jan 2002, zentara wrote:
> Hi,
> I'm trying to find all .so.xxx files on my system.
> Eventually I want to do things with them, but for
> now I just want to identify them.
>
> I pretty much have it, except I'm lacking enough
> regex knowledge to separate out the so from the .so.
> f
On Wed, 9 Jan 2002, Rohesia Hamilton wrote:
> Hello,
>
> I have recently finished my first perl script, which
> processes a form, returns an html thank you page to
> the submitter, sends them a confirmation email, sends
> the company (whose website the form is for) an email
> and appends the cont
On Tue, 8 Jan 2002, Jose Vicente wrote:
> I can't install the module because I get some errors, when I read README file i find
>this:
>
> BUILDING:
>
>
>set-up these environment variables:
> DBI_DSN The dbi data source, e.g. 'dbi:ODBC:YOUR_DSN_HERE'
> DBI_USER The username to us
On Fri, 4 Jan 2002, Connie Chan wrote:
> I 've read some doc about the difference of require and use...
> but I don't know what exactly that all means ?... what is run
> time and what is compile time ? all I hope to know is.
> which one will be faster and cost the minium loading vs time &
> t
On Thu, 3 Jan 2002, Christopher Solomon wrote:
> On Thu, 3 Jan 2002, ROry O'Connor wrote:
>
> > I'm running perl 5.6.0 that was installed when i installed redhat
> > 7.2. I tried to install a few extra modules with CPAN and it also
> > tried to upgrade me to 5.
On Thu, 3 Jan 2002, Pam Derks wrote:
> I've been trying to understand program 6.21 in the Perl Cookbook, which changes URLs
>to html links
> here's a snippet:
>
> #!/usr/bin/perl
>
> $urls = '{http|telnet|gopher|file|wais|ftp');
> $ltrs = '\w';
> $gunk = '/#~:.?+=&%!\-';
> $punc = '.:?@\-'
On Thu, 3 Jan 2002, ROry O'Connor wrote:
> I'm running perl 5.6.0 that was installed when i installed redhat
> 7.2. I tried to install a few extra modules with CPAN and it also
> tried to upgrade me to 5.6.1, but for some reason could not
> complete. I can't really tell what's going on, but som
On Thu, 3 Jan 2002, Naeemah Small wrote:
> I am creating a table form.
> The reason why, is because I want it to be neat.
> I am using CGI.pm
>
> This is my first time making a form in perl.
> How do I do it.
read all about it with the command:
perldoc CGI
or search the web->
http://www.googl
On 27 Dec 2001, Luke wrote:
> Hello people... Happy Holidays...
>
> This is my first post. Im a senior high school student and
> about to graduate this year(lets just hope hehhehe).. Im just
> wondering if any of you can recommend some good Computer Science
> books that most universities use..
I am accepting some input values via a web form. I want to compare their
values to values in the database and then update those that are different.
I am using hashes to hold the values. Here's what we've got:
#values sucked in from a form:
$params = {
report_1 => 'yes',
report
On Tue, 20 Nov 2001, shirley wrote:
> I've got a program running and extracting minimum values from the data
> base, but if there is no data available for the day on the data base, the
> value -999.9 is reflected. so how do I tell my program to skip the -999.9
> and then select the minimum valu
On Mon, 19 Nov 2001, Etienne Marcotte wrote:
> I'll be the first to answer before 10 give you the same answer: Books
>
> www.oreilly.com -> Learning Perl, Programming Perl, Perl Cookbook.
> On the net, there are many tutorials also, try google search "perl
> tutorial"
>
Oreilly books are very
On Tue, 13 Nov 2001, AMORE,JUAN (HP-Roseville,ex1) wrote:
> How do I update the value pointed to by key "PAGER" from more to pg.
> when using a reference only to the hash element for key "PAGER".
>
>
> %Unix= ("SHELL" => "/bin/csh",
>"PAGER" => "more",
>"DB" => "mysql");
>
> print
On 9 Nov 2001, Randal L. Schwartz wrote:
> > "Curtis" == Curtis Poe <[EMAIL PROTECTED]> writes:
>
> Curtis> I currently live in Portland, Oregon, USA. Recently moved
> Curtis> back here from Amsterdam, the Netherlands and missing Europe
> Curtis> more than I thought :(
>
> I own a home (tw
On Fri, 9 Nov 2001, Scott P wrote:
> Madison, Wi.
>
>
No way, really? I went to grad school in Madison before I moved out here
(California) last year. I miss it, and am thinking of moving back there
within a year or so.
Chris
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona
On Fri, 9 Nov 2001, Etienne Marcotte wrote:
> By reading the messages everyday I can guess most of us are from United
> States right? And since there are not a lot of messages in (my) morning
> time, probably means most are from the west coast (different timezone).
>
> Am I right?
>
> I'm from
On Thu, 8 Nov 2001, Christopher Solomon wrote:
> On Thu, 8 Nov 2001, Tyler Cruickshank wrote:
>
> > I would like to create a hash based on data contained in a file. Can I not use a
>variable as both the key and the value as shown below? When I print as shown I do
>not get
On Thu, 8 Nov 2001, Louis-Philippe Dextraze wrote:
>
>
>
> hi,
> I found this example on a regexp guide
> (http://etext.lib.virginia.edu/helpsheets/regex.html)
>
>
> /(^To:|^From:)/
>
> this matches either TO: or From:
>
> can I twist this in some way to make it match only
On Thu, 8 Nov 2001, Tyler Cruickshank wrote:
> I would like to create a hash based on data contained in a file. Can I not use a
>variable as both the key and the value as shown below? When I print as shown I do
>not get a value however if I write the key as:alta_guard => $names[1]then
On Tue, 30 Oct 2001 [EMAIL PROTECTED] wrote:
> Chris Zubrzycki <[EMAIL PROTECTED]> wrote:
> > prefixed
> > "by onion.perl.org (qpsmtpd/0.04) with SMTP; Tue Oct 30 16:22:25 2001
> > -"
>
>
> Looks like there is a config error in ezmlm, this is exactly what I'm
> getting (and its really con
On Wed, 24 Oct 2001, birgit kellner wrote:
> I'm sure this has been covered billion times:
> Until recently, I assumed that the binary operator "||" functions as
> either-or. Now I read that it evaluates the left side and, if it evaluates
> true, doesn't care about the right. So if I want to te
On Tue, 28 Aug 2001 [EMAIL PROTECTED] wrote:
> Ok. Now I can call a Perl program from another Perl program but I am
> having trouble returning values back to the calling Perl program. Return
> does not seem to work, Any suggestions??
>
Well... It totally depends one what you are doing. It
On Sun, 26 Aug 2001, Maxim Berlin wrote:
> Hello Christopher,
>
> Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote:
>
> CS> or am I misunderstanding you?
>
> may be.
> example:
>
> $regex=; chomp $regex;
> $variable=; c
On Sun, 26 Aug 2001, Maxim Berlin wrote:
> Hello Christopher,
>
> Sunday, August 26, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote:
>
> >> >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ?
> >>
> >> CS> You c
On Sat, 25 Aug 2001, Charles Lu wrote:
> Does anyone know if there is a built in function that allows you to check to
> see if all the characters in a string is capitalized or not? In other words
> is there a way to check to see if a string is capitalized without using
> regular expression?
On Sun, 26 Aug 2001, Maxim Berlin wrote:
> Hello Christopher,
>
> Saturday, August 25, 2001, Christopher Solomon <[EMAIL PROTECTED]> wrote:
> >> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ?
>
> CS> You can.
>
> CS> $a =~ s!
On Sat, 25 Aug 2001, Maxim Berlin wrote:
> Hello Rory,
> p.s. does anyone know, why i can not write "$a =~ s/$///g;" ?
You can.
$a =~ s!$/!!g;
Perl just gets confused with the /'s, you have to use alternate
delimiters.
Chris
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
I'm not sure exactly what you want to do...
Do you want to replace all of the marked a's:
On Fri, 24 Aug 2001, Danial Magid wrote:
>
> This is a link to another place
^ ^ ^
or do you just want to replace the word 'a'?
If you just want to repl
On Fri, 24 Aug 2001, Christopher Solomon wrote:
> On Fri, 24 Aug 2001, Michael Dube wrote:
>
> > Hi,
> >
> > I have a script that uses require to include additional perl scripts at
> > runtime. I would like to call a function if and only if that function is
>
On Fri, 24 Aug 2001, Michael Dube wrote:
> Hi,
>
> I have a script that uses require to include additional perl scripts at
> runtime. I would like to call a function if and only if that function is
> defined in the required module. How would this be done? Would the define()
> function work?
On Thu, 23 Aug 2001, Buffy Press wrote:
> Hello,
>
> I am *very new* to Perl and to this list. I have a question I am hoping
> someone can answer. I am looking over an existing Perl script and came
> across this block of code:
>
> # Create the cmdfile
> my $runprog = "$NexBase::idxBase/
44 matches
Mail list logo