Can anyone recommend a good book to use for building a website using Perl?
Specifically, I'm looking to build a backend to a mobile app. Everything
I've been trying to search for seems dated (2005 and earlier).
Richard Johnson
I'm getting both new lines to print.
[code]
use 5.10.0;
print "1: ";
print 3 > 1, "\n";
print "2: ";
print 3 == 3, "\n";
[/code]
[output]
>perl booltest.pl
1: 1
2: 1
>
[/output]
Richard Johnson
(708)253-8130
On Fri, Jan 4, 2013 at 5:43 PM, Elim Qiu wrote:
> It's on snow leopard, perl versi
I am working my way through Intermediate Perl and have a question
concerning one of the exercises (It's a long-ish exercise, so I won't
bother typing it out as it's irrelevant to the question at hand). The
author's solution contains the following code:
... code ...
my ($gather, $yield) = gather_mt
Sorry for overr writng
But this pop into my head while walking.
-Original Message-
From: "John W. Krahn"
Date: Tue, 28 Jul 2009 13:07:38
To: Perl Beginners
Subject: Re: Subroutine foo redefined a bar
Dermot wrote:
> 2009/7/28 John W. Krahn :
>
> Thanx for gettig back to me.
>
>> Whic
Thank you.
Its very clear now.
-Original Message-
From: "John W. Krahn"
Date: Sat, 27 Jun 2009 10:46:28
To: Perl Beginners
Subject: Re: help on example from "mastering algorithm with perl" on binary
search
rich lee wrote:
> Hello everyone,
Hello,
> I am
Hello everyone,
I am trying to read "mastering algorithm with perl" and below example has me
bit stuck.
I understand everything except these 2 lines
$low = $try + 1, next if $array->[$try] lt $word;
$high = $try -1, next if $array->[$try] gt $word;
I understand what it's
On Sun, 2009-06-21 at 07:16 -0700, John W. Krahn wrote:
> EASY buzzhost.co.uk wrote:
> > OK, I'm an idiot. I just cannot get a simple regex match to work as
> > intended. I've google, I dug out my books of regex and Perl but I hang
> > my head in shame and ask here for help;
> >
> > Take This line
Away from PC so I cannot hookup
Is alarm perls internal function?
-Original Message-
From: "Chas. Owens"
Date: Wed, 1 Apr 2009 10:18:51
To: Kelly Jones
Cc:
Subject: Re: Calling subroutine every second using alarm fails
On Wed, Apr 1, 2009 at 08:48, Kelly Jones wrote:
> I want a scrip
I personally enjoy reading all your post but I think star is better than numberS
-Original Message-
From: "Chas. Owens"
Date: Mon, 16 Mar 2009 00:38:28
To: Perl Beginners
Subject: I am considering changing my footnote style.
As many of you have probably noticed, I am addicted* to footn
Will try that once I get back
--Original Message--
From: Owen
To: beginners@perl.org
Subject: Re: picking largest key by value..
Sent: Feb 26, 2009 3:53 PM
On Thu, 26 Feb 2009 15:34:11 -0500
Rick wrote:
> trying out getting lasrgest key(by value) but below is not working...
>
> help ple
Could anyone point me to a good site for pearl compiler download.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
s in advance for any help. I've scoured this list as
well
as the rest of the Internet without any hint as to what this problem really
is or
how it can be resolved.
Rich Wells
Thanks Wiggins,
> As far as reading the message in,
> parsing it, and then forwarding it, I guarantee the Mail::Box
> suite can
> handle what you want, but it does have a learning curve.
You are right, I did not read the doco carefully enough. Sorry.
> Sorry I can't provide source what I wrote
hile
> doing what ever you like with it - for example sleep(3600) in
> fork / or
> threaded spawn of you programm.
>
> MNibble
>
>
> Rich Fernandez wrote:
> > Hi folks,
> >
> > I'm working on a project where I'm given a pool of users
>
Hi folks,
I'm working on a project where I'm given a pool of users and I have to
determine if there are any messages in their spool files, and if so, forward
them on to a new user.
I'm looking for functionality similar to what you get with a .forward file,
only I don't want the messages forward
I'm trying to install Date::Simple using the CPAN module and I get errors
out of "make test" which fails the installation.
Here's what I've done and a part of the output:
# perl -MCPAN -eshell
cpan> install Date::Simple
---
Running make test
PERL_DL_NONLAZY=1 /usr/bin/pe
I have a hash which looks something like this:
%hash = ( foo => 'a', bar => 'b', filespec => "$filespec");
I also have a function which includes the following code:
# Figure out if we were passed a filename or an array ref
if ( exists $info -> {filespec} ) {
$filespec = $info ->
I'm unclear about how alternation works in a regex.
Say I want to find either "foo" or "bar" within a string. I don't care which
one I match, only that I make a match.
Would this be correct: /foo|bar/
Should they be grouped thusly: /(foo|bar)/
What about /(?:foo|bar)/ ?
Specifically, I k
Hi folks,
I'm using CPAN.pm to install Bundle::CPAN (and others) and I get a message
that says:
make: cc: Command not found
How can I specify gcc instead of cc without having to edit each individual
Makefile?
I created a link called "cc" and pointed it to /usr/local/bin/gcc, but I get
all kinds
Can some one tell me if there is an easy way generally speaking to migrate
one version of perl and the modules installed under it to another version?
Also, in this specific case I want to go from 5.00503 to 5.8.0 The wrinkle
is that the box that needs to be upgraded does not have http/ftp access t
is browser levels, if
the user is on an older one the code doesn't work. So if you have some
controls on this, like it is a company Intranet, as here, then you can
use their ideas, try to use their "Cross browser techniques".
Happy coding.
--
Rich Parker
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks guys,
This is what I was looking for, more of those undocumented way to do
things. But with the way programmers "Do things" do you find there is a
"Standard" generally when it comes to dealing with hex
variables/characters??
Thanks.
zsdc wrote:
Rich Parker wrote
On Tue, 19 Aug 2003 14:20:47 -0700, Rich Parker <[EMAIL PROTECTED]> wrote:
Hi,
I have been watching the thread about the file::copy. I ran into an
issue in the Linux environment that brings a serious question, MAX file
size. Keep in mi
Hi,
I have been watching the thread about the file::copy. I ran into an
issue in the Linux environment that brings a serious question, MAX file
size. Keep in mind the server is running 7.0 RH, we have 7.2 Enterprise
Server also, and we pay for support. But even the RH support says they
can't handle
Howdy,
I use many different languages here at work, from Assembly, Rexx, to
other mainframe languages. One thing I find it difficult to do with Perl
is the handling of Hex characters. This may seem like a very generalized
question, forgive me for trying to find a "Better way to do it". Picture
ob Showalter <[EMAIL PROTECTED]>
20/08/2003 16:20
To: "'Rich Parker'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
cc:
Subject:RE: Executable perl program help!!
Rich Parker wrote:
I was at Active State the other day, they have one that can
pile using
export LDOPTS=`perl -MExtUtils::Embed -e ldopts`
export CCOPTS=`perl -MExtUtils::Embed -e ccopts`
perl -MO=C script.pl > script.c
gcc $CCOPTS script.c -o script $LDOPTS
This works only on some scripts. The O.pm is still evolving
Ram
--
Rich Parker
http://www.fssi-ca.com
mailto:[EM
of YOU seen this problem? I can't be the only person
dealing with large files. Ideas?? How is this issue on later releases??
THanks.
--
Rich Parker
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
because I just got a job with an all-Windows shop
migrating apps from C++ to .NET. Except for Windows workstations and a
little bit of MS ODBC, all my professional experience has been on Tandem,
Solaris, and AIX. I hope .NET is as cool as de Icaza says it is, because
Windows kinda creeps me out. I
ut WAIT, I'm working on Linux Systems, how
does that effect what I am asking?? If someone could provide me a link
to some articles about .NET from many different perspectives, preferably
NOT by MS (If you catch my drift here). I want to see if this framework
is going to be something of use to
I want to set it up so that at least one of
email field (not neccesarrily the first filed) gets a vaild email address.
Then I want to push the email addresses to an array :
push @stprecips
then print the array in the outgoing email To: field.
Any help is appreciated
Thanks
--
Rich Po
to.
I think I have a good idea how to do this except for one thing. How do I get the page
from the html page the script is being called from and then create
temporary variable that I can print the title on /send_this_page.pl and also make it
the subject of the outgoing email?
Thanks
--
Rich
Sorry, I'm a unix guy...ctrl-d works on my unix box.
You might try that instead, just to see :)
richf
-Original Message-
From: Anthony Beaman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 10:24 AM
To: Rich Fernandez
Cc: [EMAIL PROTECTED]
Subject: RE: Array Question
Hi Anthony,
LF (\n) is the default record separator, so if you type 3 names and press
enter,
all 3 names get placed in $array[0].
The next item(s) get placed in $array[1], etc depending on where you press
enter.
If your input looks like this:
Fred Barney
Wilma Betty
your program will print "
-Original Message-
From: Rich Fernandez [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 3:51 PM
To: '[EMAIL PROTECTED]'
Subject: MIME::Lite : Can someone please point out what I'm doing wrong?
my $msg = MIME::Lite -> new(
From=> '[EMA
Hello,
I wrote a script which tars up a file and mails it out as a MIME attachment.
When I run it I get a message that says "no data in this part" at line 35. A
message does show up in my Inbox, but w/o the attachment.
It must be something simple but I just don't see it. Here's the code:
---
Doh! I forgot about using $! All I need is
s/#$/\n/ ;
Thanks to Tor & Tanton for getting my brain in gear...
> -Original Message-
> From: Busse, Rich
> Sent: Tuesday, 23 July, 2002 09:00
> To: 'Perl Beginners'
> Subject: Replace last # with
I have a string that looks like
Operator Overview#PGM#Report about all configured
operators#/opt/OV/bin/OpC/call_sqlplus.sh all_oper#
I want to replace the last "#" with a newline. I've come up with a few ideas
like
substr ($_, rindex ($_, "#"), 1) = "\n" ;
or
substr ($_, length ($_) - 1, 1) =
# Here's one way:
my $speed_cost_code = '';
if($avg_speed >= 0 && $avg_speed <= 5) { $speed_cost_code =
"A"; }
elsif ($avg_speed > 5 && $avg_speed <= 15) { $speed_cost_code =
"B"; }
elsif ($avg_speed > 15 && $avg_speed <= 25) { $speed_cost_code =
"C"; }
#
);
/(\S+)=(.+?)(?=\s+\S+=|\z)/g
${$keys{uc $1}} = $2;
Again, thanks for your time...
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 23 April, 2002 17:39
To: [EMAIL PROTECTED]
Subject: Re: Parsing a line
Rich Busse wrote:
>
> I'm currently p
I'm currently processing lines from an input file this way:
$_ = "P=IcwRcsm D=D:SL=20 ST=d:\icw\rcsm\StartSv.bat
U=http://uslv...";
@Token = split ;
foreach (@Token)
{
$Proc = $' if (/P=/i) ;
$Start = $' if (/ST=/i) ;
Thanks Daryl & 'Japhy' for your suggestions. I ended up using:
$Out = `$Cmd` ;
$Out =~ /^\|GRP\|\s*(.*)/m ;
The data I want ends up in $1.
-Original Message-
From: Busse, Rich
Sent: Tuesday, 26 February, 2002 09:35
To: Perl Beginners
Subject: Reg E
I am capturing the output of a command in a string:
$Out = `$Cmd` ;
The output always looks like:
List of Templates and Template Groups assigned to 'somenode.us.dnb.com':
|GRP| SBS-DSM
=
I'm working with some log file entries that look like:
BDE Monitor End - Wed Jan 30 08:36:28 2002
I need to turn the time stamp part of it into:
2002 01 30 08 36 28
Are there modules available for this type of conversion? Would Date::Manip
be a good choice?
--
To unsubscribe, e-mail: [EMAIL
Hi,
I am able to install Perl 5.6.1 on my solaris box, but cannot get it to
include SuidPerl in the installation.
Do I have to enable something in the ""Configure"" script?
""d_dosuid"" maybe?
Or is it something to do with SUID in my Solaris Kernel that I need to
enable or disable.
Am not sure.
;
exit;
$opt_size never appears to get assigned to anything. I have also tried
to use the @ARGV array, with no luck. I have been using Perl on Unix
for years, and this is my first (and maybe last) attempt at using Perl
on Windows 2000. Thanks in advance!
-Rich
--
To unsubscribe, e-mail: [EMAIL P
List admin: please unsub me manually, the ezmlm mailto is barfing on the
'+' in my address.
Thanks -- Rich
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have a list that contains some good data and some empty strings, like:
("Abiosdsk", "Afd", "", "", "", "Aha154x", "Aha174x", "aic78xx", "",
"Alerter", "", "", "", "Always", ...)
Is there a simple way to get rid of the empty strings and compress the list
down to:
("Abiosdsk", "Afd", "Aha154x",
This might have been beaten to death today, but I'd like to add my $0.02:
1. You Linux guru says "C would be faster than Perl"? Prove it. Are there
any specific benchmarks? Probably not. Remember, assembly language is faster
than C!
2. Just this morning I wrote a 3 line Perl fragment to run a pr
Been a while since I had to do this... you need 'zeller congruence', an
arithmetic formula to convert date to day-of-week (circa late 1800's
IIRC). Google says 475 hits -- Rich
On Mon, 3 Dec 2001, C.E.O. wrote:
> Date: Mon, 3 Dec 2001 13:25:18 -0600
> From: C.E.O. <
fcntl.
However the problem persists. We re-ran the test script and again "obtained
lock and
shouldn't have".
Can anyone point us in the right direction?
Please let me know if I need to provide more details.
Thanks!
--Rich
The test script by L. Stein is quoted below:
#!/usr/bin/pe
FWIW and for other newbies that might care...
I'm not sure why this works, but it does.
If I issue the command:
rename $source, $target or warn "...";
where $source contains my funky file name --> 'ENDPNA.PROD.HRBANS(EDIFACT)'
it _just_works_!
No need to escape anything!!!
I was gett
Thanks for all the responses, but I'm still trying to get this to work.
I put a couple of print statements in and re-ran the script sending
the output to a log: map_rename.pl > map_rename.log 2>&1
Here's the contents of the log file (I'm using only 3 files for testing)...
\'ENDPNA.PROD.HRBANS(ED
It all started out as a simple script to rename some files.
Now I can't find my way out!
I have several hundred files that are named like this:
'ENDPNA.PROD.HRBANS(EDIFACT)'
Note that the file name includes single ticks, dots, and parens.
Here's what I've done so far:
while (<*>) {
IIRC the warning is intentionally suppressed if the alleged 'reserved
word' is uppercase, i.e. it will complain about "open f,$file" but
not "open F, $file".
On Sat, 27 Oct 2001, Jan wrote:
> Date: Sat, 27 Oct 2001 20:39:48 +0200
> From: Jan <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject:
Watch the backslashes...
Try:
system("D:\\ultraedit\\uedit32.exe netlog.txt");
-Original Message-
From: phumes1 [mailto:[EMAIL PROTECTED]]
Sent: Monday, 22 October, 2001 08:02
To: [EMAIL PROTECTED]
Subject: Re: Running application
I have the following script which runs UltraEdit but
Mebbe something like this?
sub ls { for (<$_[0]/*>) { print "$_\n"; ls($_) if -d; } }
ls ".";
On Tue, 16 Oct 2001, The Black Man wrote:
> Date: Tue, 16 Oct 2001 08:10:31 -0700 (PDT)
> From: The Black Man <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Listing directory contents
>
> Hi a
If you mean that you have a string containing "61626364" and you want
"abcd":
print pack "a*", "61626364";
On Mon, 24 Sep 2001, Hernan wrote:
> Date: Mon, 24 Sep 2001 13:50:52 -0400
> From: Hernan <[EMAIL PROTECTED]>
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Subject: convert hexa to text
For Windows NT, try
system ("start $command");
For a load of options, enter "start /?" at the Windows NT command line.
-Original Message-
From: Najamuddin, Junaid [mailto:[EMAIL PROTECTED]]
Sent: Friday, 21 September, 2001 14:56
To: 'Sidharth Malhotra'; Jonathan Howe; [EMAIL PROTECTE
OK, first:
$job{ra}=~/^(.*)\d\d/
does two things: returns true if $job{ra} contains two digits, and assigns
the portion of the string BEFORE the two digits to $1.
Second: The ? is not part of the regex. Syntax x?y:z evaluates to y if x
is true, or to z if x is false, basically an inline if-then
For position, try:
$p=($job{ra}=~/^(.*)\d\d/?length $1:-1);
$p is 0-based index of '\d\d', or -1 if none.
On 10 Sep 2001, Rupert Heesom wrote:
> Date: 10 Sep 2001 12:28:11 -0400
> From: Rupert Heesom <[EMAIL PROTECTED]>
> To: Beginners Perl <[EMAIL PROTECTED]>
> Subject: Problems using REGEXP
Windows NT 4.0 has 2 file compare utilities. COMP is a leftover from DOS,
but might be useful. FC is a little more flexible & has a couple more
features. Type COMP /? or FC /? from a Windows NT command line for details.
Microsoft Visual C++ 5.0 includes WINDIFF, which is does file compares with
a
You can use the Shell function, according to my ancient VB 3.0 manual:
Dim TaskId, Style
TaskId = Shell ("perlscript.bat", Style)
Simple? However:
* You should also code an On Error in case VB can't run/find perlscript.bat.
* 'Style' is a number 1-9 depending on how you want to run it.
Does anyone know how to zip files with Perl on a windows platform?
I have a couple of directories that I want to zip up and archive
periodically.
Thanks!
richf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks folks (Bob, Mel)!
I got 2 different ways to do the same thing. Choice is good :-)
--richf
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
I've been asked to write a CGI script that takes a URL of the form:
https://webserver/cgi-bin/myscript.cgi/myreport
and redirects the browser to:
https://webserver/cgi-bin/myscript.cgi/full/path/to/report/myreport
In other words, we want to hide the true URL of the report fr
In C, I can do something like this:
char ch ;
char sz [] = "?:\\dir\\myfile.ini" ;
for ( ch = 'c' ; ch <= 'z' ; ch++ )
{
sz[0] = ch ;
. . .
to spin thru all the possible drives on a Windows NT box. But Perl complains
about trying t
> -Original Message-
> From: Timothy Kimball [mailto:[EMAIL PROTECTED]]
> print STDOUT $query->header(
> -type => "video/mpeg",
> );
>
> open MOVIE, $vidfile or die "Couldn't open $vidfile: $!";
> while ( read(VIDFILE, $_, 100_000) ) { print STDOUT; }
> close MOVIE;
>
Thanks, thi
Thanks for your responses but
I guess I wasn't clear enough with my original question. Sorry.
Let me try again...
I _already_ have a link on my page that says
http://gromit/cgi-bin/juggling.pl?video=rr.mpg>
Rubinstein's Revenge"
When this link is clicked, my script will parse the URL and determi
ew();
my $vidfile = $query -> param("video");
print $query -> header();
print end_html;
-
Question is, how do I get the script to display the video. Doesn't seem like
a print statement is what I want...
Any help?
Thanks!
Rich
70 matches
Mail list logo