in
use.
So...does anyone know a way to tell if a particular character will be
printable for a particular terminal type (so I can substitute it if I
can't)?
TIA,
Paul Archer
Never ascribe to malice what can perfectly
well be explained by stupid
*Vey* cool examples--especially the 'map' in the first one.
Thanks!
Paul
7:26am, Todd W. wrote:
>
> "Paul Archer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Is there any (quick and easy) way to get a reverse range, like (
4:09pm, Ramprasad A Padmanabhan wrote:
> Paul Archer wrote:
> > Is there any (quick and easy) way to get a reverse range, like (10..1),
> > rather than a standard (1..10)? The catch is to *not* use 'reverse'.
> > I'm teaching Sun's perl course this week
Is there any (quick and easy) way to get a reverse range, like (10..1),
rather than a standard (1..10)? The catch is to *not* use 'reverse'.
I'm teaching Sun's perl course this week (DTP-250), and we were talking
about working on arrays. The book had an exercise that had the student
reverse an arra
Just a quick tip, which the docs mention that 'exists' and 'defined' will
let you know if a particular element of a hash exists, or is defined, they
work on arrays just as well.
(I didn't know that, but a student today asked, so I tried it out.)
Paul
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
p with "diamond". And I'm the culprit
> responsible for "spaceship".
>
> --
And we (I, anyway) thank you. I got a good laugh out of that today when I
told my class that's what it was called--"no, really, that's it's name..."
Paul Archer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
4:53pm, Paul Johnson wrote:
> Paul Kraus said:
>
> > Wow. I find that unusual in my 10 years of computer use/programming ...
> > I have always referred to $ and heard it referred to as "string".
> >
> > Not that it matters but I find that definitely unusual :)
>
> Do you have a background in BASIC
Does anyone know of a pronunciation guide for the special variables and such
in Perl? I came up empty on Google. I've been learning Perl by reading and
doing, but I haven't talked to anyone face-to-face, so I'm not sure, for
example, if $_ is spoken "dollar-underscore", or if people typically say
s
Yesterday, Wiggins d'Anconia wrote:
> Yes and no. There are multiple different implementations of threads all
> of which have some good and bad points. You will need to look more into
> them depending on your version of Perl and how complex the task is that
> you wish to accomplish. (There is also
Actually, while we're on the subject: can anyone *really* explain the
difference between the two, or perhaps more importantly, when someone would
want to use 'our' over 'my'? I've read the docs, but they're not sinking in.
TIA,
Paul
2:53pm, Dan Muey wrote:
> Anybody know what version of Perl o
/ p e r l \n
> 058
This is more of a Unix trick than Perl, but worth mentioning (I guess):
An(other) easy way to check for normally unprintable characters is to "send
your cat to the vet". cat -vet weatherbug.pl
-v show most non-printing characters
-e show en
> > > I have a perl job I want to run out of a cron job, However cron is not
> > > reading my .cshrc file by default. So what I have to do is "wrap" the perl
> > > job in a tcsh shell and then run the shell file out of cron.
> > >
> > > Is there a better way? Or maybe the real question is should I
In addition to the suggestions already given, you could sort your array, and
then look at the middle and cut it in half (potentially several times). I
forget the name for this technique, though...
For example, you have 1000 elements, sorted. You compare your number to the
500th element. If it's hi
Yesterday, [EMAIL PROTECTED] wrote:
> This may be a bit off topic, but I'll ask it..
>
> I have a perl job I want to run out of a cron job, However cron is not
> reading my .cshrc file by default. So what I have to do is "wrap" the perl
> job in a tcsh shell and then run the shell file out of cron
Yesterday, [EMAIL PROTECTED] wrote:
> I have been writing perl along with some other languages, and I have been
> thinking about setting up a server (so that I can play with different
> server OS's and settings without messing anything up on our home network).
> My parents think that it will cost
11:29am, Ramprasad A Padmanabhan wrote:
> > > do "foo.pl args..."
> > >
> > > And in foo.pl set some scope defined variable like
> > >
> > > #foo.pl
> > > $dbh=connect()
> > > unless($dbh){
> > > $GLOBAL::ERRORSTR="Couldnot connect to database $@";
> > >exit 1
> > > }
> > >
> > >
> > > A
Here's a quick way:
perl -e '$var="abdaatela"; print ((scalar grep /a/,(split /(.)/,$var)),"\n");'
grep returns the number of matches in a scalar context, and the split breaks
the string up into separate elements. The parens in the split return the
item split on (otherwise it would throw away each
> Anyone know if it's possible for the return/exit value of a script, in the
> event of success, to be something other than 0?
>
The 'exit' command should work just like it does in the shell: 'exit 9;' for
example, *should* give you an exit status of 9 (although I couldn't get it
to work for me a m
Thanks a lot! This is just what I was looking for in your first example.
(The second example won't do me as much good, as I need to consider
characters that haven't changed inside of a string of characters that
have--but it's still a good reference.)
Thanks again,
paul
10:11am, Rob Anderson wro
I'm working on a bit of code to update a serial LCD display. The display is
4 lines by 40 characters, and each character can be addressed individually.
First, the pseudocode I have is:
compare each element of the new string and the old string
# each string is 160 characters, and represents what i
have no idea if one is
going to have any significant advantages/disadvantages over the other.
Any suggestions?
Thanks,
Paul Archer
-
witzelsucht (vit'sel-zoocht) [Ger.]
"A mental condition characteristic of frontal lo
3:28pm, Bob Showalter wrote:
> Paul Archer wrote:
> > The answer to this is probably out there somewhere, but I haven't run
> > across it yet, so a pointer to a webpage/tutorial/FAQ/whatever would
> > be fine...
> >
> > I'm trying to put together
ade, and data written to the LCD).
I suppose I could have a call like:
$main_display->refresh_from_other_object(\$menu_display)
(or something like that...I'm still getting used to the syntax), but that
seems a waste to have to pass data manually, when the $menu_display object
should be able
Sorry, nope. The thing is that shell scripts are essentially shell commands
for control, and external commands for everything else.
OTOH, manually rewriting a shell script in Perl is going to give you lots of
experience in Perl. 8-)
My best advice: take a deep breath and dive in.
Paul
5:59am, th
her_yates_shuffle( [EMAIL PROTECTED] ) :
# generate a random permutation of @array in place
sub fisher_yates_shuffle {
my $array = shift;
my $i;
for ($i = @$array; --$i; ) {
my $j = int rand ($i+1);
@$array[$i
You need no changes at all to receive the input. Getting the input however
into your program you need to understand CGI interface. I suggest you 1)
Subscribe to [EMAIL PROTECTED] and 2) read up some tutorials on CGI
Jason
- Original Message -
From: "Horace Franklin Jr." <[EMAIL PROTECT
- Original Message -
From: "Jason Archer" <[EMAIL PROTECTED]>
To: "Zielfelder, Robert" <[EMAIL PROTECTED]>
Cc: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Tuesday, March 25, 2003 3:56 PM
Subject: Re: Perl/TK problem with sub routines
Hi,
how can I use a module that is located in the same directory as my .pl file?
I'm searching for an equivalent to the C++ #include "headerfile.h" directive,
which includes a header located in the current pwd.
Thanks
Robert Spielmann
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
28 matches
Mail list logo