Re: help with extracting text from a string

2002-02-15 Thread Jenda Krynicky
From: Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> > On Feb 14, Bill Akins said: > > >I have a string that is read in and assigned to a veriable. String > >looks something like this: 10.00 c$cpi c$ul (Sample Number:) c$sh > >/Courier 0 c$fnt ( SA-01-0C8A8) c$sh ( ) c$sh /Courie

Re: String manipulation help needed

2002-02-15 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Brett W. McCoy" <[EMAIL PROTECTED]>: > On Thu, 14 Feb 2002, Brian Johnson wrote: > >> I need a string in the form >> Wed, 18 Jul 2001 14:20 >> >> Of course my line doesn't quite cut it. >> my $emaildate = join " ", $record->{day}, $record->{month}, >>

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-15 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Chris" <[EMAIL PROTECTED]>: >> ... > Thanks! > > ... > my $newresult = $result; > print "New Results - $$newresult\n"; > my $resultcode; > print "Result Code - $$resultcode;\n"; > if ($newresult = 200) { Take Care: You surely meant

Re:a better Perl way

2002-02-15 Thread Jorge Goncalvez
Hin I have this piece of code and i wanted to make it simpler and shorter Yhanks my $Range1 = $1 . ($2 + 1) if $IPREAL[0] =~ /^(.*\.)(.+)$/; my $Range2 = $1 . ($2 + 1) if $IPREAL[1] =~ /^(.*\.)(.+)$/; my $Range3 = $1 . ($2 + 2) if $IPREAL[0] =~ /^(.*\.)(.+)$/;

$|

2002-02-15 Thread Anette Seiler
Hi, I am a newbie in Perl. My boss (who isn't a newbie) has given me one of his programs. I am now trying to understand this program. Right in the beginning it says: $| = 1; # flush output after each write or print What does it mean? Kind regards Anette Seiler -- To unsubscribe, e-mail:

Re: $|

2002-02-15 Thread Jenda Krynicky
From: "Anette Seiler" <[EMAIL PROTECTED]> > I am a newbie in Perl. My boss (who isn't a newbie) has given me one > of his programs. I am now trying to understand this program. > > Right in the beginning it says: > > $| = 1; # flush output after each write or print > > What doe

$foo

2002-02-15 Thread Susan Aurand
I am learning Perl, so this may seem a dumb question to the advance Perl Programmers. What exact purpose does $foo do? Example $foo=$_. What benefit do I get from making the input string $foo? Every place I look I do not get a clear understanding or picture of $foo. Thank you Susan -- To unsu

RE: $foo

2002-02-15 Thread John Edwards
lol. This should help explain. http://whatis.techtarget.com/definition/0,,sid9_gci212139,00.html When you see something like $foo = $_; It means that someone is taking the value of the default variable ($_) and assiging in to another scalar. In this case, $foo, but it could just as easily be

Re: $|

2002-02-15 Thread William.Ampeh
Straight from the Perl Cook book. 7.12. Flushing Output (page 248) when printing to a filehandle, output doesn't appear immediately. This is a problem is CGI scripts running on some programmer-hostile web server, where, if the web server sees warning from Perl before it sees the buffered outp

Re: $foo

2002-02-15 Thread Jenda Krynicky
From: Susan Aurand <[EMAIL PROTECTED]> > I am learning Perl, so this may seem a dumb question to the advance > Perl Programmers. What exact purpose does $foo do? Example $foo=$_. > What benefit do I get from making the input string $foo? Every place > I look I do not get a clea

Getting the proper info from an INI file...

2002-02-15 Thread Chris
I found some code, on the net, on access an INI file... I have modified it to try and assign certain values out. Here is the code: my ($iniFile, $UserID, $Tester, $DNS1, $DNS2, $pwd); $iniFile = 'c:\\test.txt'; &readini; print "Tester : $Tester\n"; print "UserID : $UserID\n"; print "Passw

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-15 Thread Chris
Andrea Holstein wrote: > In article <[EMAIL PROTECTED]> wrote "Chris" <[EMAIL PROTECTED]>: > > >>>... >>> >>Thanks! >> >>... >> my $newresult = $result; >> print "New Results - $$newresult\n"; >> my $resultcode; >> print "Result Code - $$resultcode;\n"; >> if ($newresult = 20

Re: Help me out

2002-02-15 Thread Susan Aurand
I took your advice and added the following code to my source code. I want to print the students name to the result file regardless if I add a number on the end of the student name or not. I have tried putting the PRINT O at different location in this code. I can not get it to print to the result

printing "\n" automagically?

2002-02-15 Thread Dennis G. Wicks
Greetings; Is there any easy way to get print to do a "\n" without coding it explicitly? Most of the code fragments posted don't have any line feeds in the print statements and without them the output gets all strung together, overlaid with the prompt, interspersed with messages from the mail se

RE: printing "\n" automagically?

2002-02-15 Thread Nikola Janceski
local $\ = "\n"; man perlvars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 11:26 AM To: [EMAIL PROTECTED] Subject: printing "\n" automagically? Greetings; Is there any easy way to get print to do a "\n" without coding it explici

Mail::Sender on WinNT - can't connect

2002-02-15 Thread murphy, daniel (BMC Eng)
I've been wanting to send mail from some of my scripts, so I thought I'd see how to get it to work. I chose to use Mail::Sender and am running Perl 5.005_03 from ActiveState build 522 (I know, it's old) on WinNT. When I run this simple test script: use Mail::Sender; ref ($sender = new

RE: Mail::Sender on WinNT - can't connect

2002-02-15 Thread Nikola Janceski
shouldn't your smtp parameter have the full hostname? You should also check that your server is accepting smtp connections from the user and machine your are running this script on. -Original Message- From: murphy, daniel (BMC Eng) [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 200

RE: Help me out

2002-02-15 Thread John Edwards
open(IN,'STNAMES.DAT') or die "Can't open STNAMES.DAT: $!"; # open student consolidated names open(OUT,'>results') or die "Can't create results: $!\n"; # result file open output $counter = 1; # Use a better variable name than c. What does c stand for?? I'm assuming counter foreach () { # Now REA

Win32::RasAdmin

2002-02-15 Thread Veeraraju_Mareddi
Dear Team, I am trying to install Win32::RasAdmin.but I am getting some errors.Is there any way of Source where there are not errors. While installing Form Activestate.com ,Roth.net,PPD format is not working. Could anybody of you can tell where is the Correct Source to Install. The Matter is u

RE: printing "\n" automagically?

2002-02-15 Thread Dennis G. Wicks
Thanks! That works great! But!!!: [root@iodine root]# man perlvars No manual entry for perlvars [root@iodine root]# perldoc perlvars No documentation found for "perlvars". [root@iodine root]# ???, Dennis >}On Feb 15, 9:33, Nikola Janceski wrote: >}

Latest build of Perl

2002-02-15 Thread Ned Cunningham
I have Build 628 of PERL for NT. Is this the latest and greatest?? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

@INC

2002-02-15 Thread Pam Derks
Am trying to find out what modules have been installed on my system. I know they're stored in the @INC array, but how do I find out which ones they are? thanks for any help, Pam -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: printing "\n" automagically?

2002-02-15 Thread Nikola Janceski
that was a typo... man perlvar (no 's') or goto perldoc.com and search for perlvar -Original Message- From: Dennis G. Wicks [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:24 PM To: Nikola Janceski; [EMAIL PROTECTED] Subject: RE: printing "\n" automagically? Thanks! Tha

Re: printing "\n" automagically?

2002-02-15 Thread Jon Molin
"Dennis G. Wicks" wrote: > > Thanks! That works great! > > But!!!: > > [root@iodine root]# man perlvars > No manual entry for perlvars > [root@iodine root]# perldoc perlvars > No documentation found for "perlvars". > [root@iodine root]# > it's perldoc p

RE: windows paths

2002-02-15 Thread Bob Showalter
> -Original Message- > From: Stuart Clark [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 10:23 PM > To: perllist > Subject: windows paths > > > Hi all, > > I am putting together a script on windows. > > It uses filehandles. > > The problem is that for some reason it do

RE: printing "\n" automagically?

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Dennis G. Wicks wrote: > Thanks! That works great! > > But!!!: > > [root@iodine root]# man perlvars > No manual entry for perlvars > [root@iodine root]# perldoc perlvars > No documentation found for "perlvars". > [root@iodine root]# Should be pe

Re: Getting the proper info from an INI file...

2002-02-15 Thread Jenda Krynicky
From: Chris <[EMAIL PROTECTED]> > I found some code, on the net, on access an INI file... There are about 10 different modules for INI files on CPAN. I bet they'll be better than some code you found on the net and they'll be supported. Jenda === [EMAIL PROTECTED] == h

Re: Mail::Sender on WinNT - can't connect

2002-02-15 Thread Jenda Krynicky
From: "murphy, daniel (BMC Eng)" <[EMAIL PROTECTED]> > I've been wanting to send mail from some of my scripts, so I thought > I'd see how to get it to work. > > I chose to use Mail::Sender and am running Perl 5.005_03 from > ActiveState build 522 (I know, it's old) on WinNT. W

Re: Getting the proper info from an INI file...

2002-02-15 Thread Chris
Jenda Krynicky wrote: > From: Chris <[EMAIL PROTECTED]> > >>I found some code, on the net, on access an INI file... >> > > There are about 10 different modules for INI files on CPAN. > I bet they'll be better than some code you found on the net and > they'll be supported. > > J

convert ctime to a string

2002-02-15 Thread Dermot Paikkos
Hi Gurus, SYS stuff: perl 5.005 on TRU64 UNIX or activeperl 5.6 on Win32. I am getting a file listing and want to get the ctime (create time) for each file. My understanding is that ctime is stored in stat[10] but this is returning a interger such as 91070454. I was h

Re: Win32::RasAdmin

2002-02-15 Thread Rick Coloccia
What version of perl are you using? Type perl -v at the c prompt and see. If you get this: This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2001, Larry Wall Binary build 631 provided by ActiveState Tool Corp. http://

Re: @INC

2002-02-15 Thread walter valenti
You can find in the directory of @INC For example a module XX::pippo you must find @INC/XX/pippo.pm Walter >Am trying to find out what modules have been installed on my system. I know they're >stored in the @INC array, but how do I find out which ones they are? > >thanks for any help, >

RE: Mail::Sender on WinNT - can't connect

2002-02-15 Thread Mark Richmond
As Jenda mentioned your exchange server might not support SMTP. You may also run into mail relay problems with exchange if you don't authenticate with a DOMAIN. Also it's very likely that exchange is not configured to relay outside the company. For simple mail messages I use Mail::Sendmail # E

Re: convert ctime to a string

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Dermot Paikkos wrote: > Does anyone know how to either get the ctime as a string or convert > the interger into a date that is meaning full?? Sure: my @stats = stat($file); print "Create Time: ", scalar(localtime($stats[10])), "\n"; See perldoc -f localtime -- Brett

Re: convert ctime to a string

2002-02-15 Thread walter valenti
use Time::localtime; sub tempo{ my $tm=localtime(); my $h=$tm->hour; my $m=$tm->min; my $s=$tm->sec; my $md=$tm->mday; ##giorno my $me=$tm->mon+1; ##mese my $y=$tm->year+1900; return "$h:$m:$s [$md/$me/$y] "; } Walter >Hi Gurus, > > SYS stuff: perl 5

Re: convert ctime to a string

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Brett W. McCoy wrote: > > Does anyone know how to either get the ctime as a string or convert > > the interger into a date that is meaning full?? > > Sure: > > my @stats = stat($file); > > print "Create Time: ", scalar(localtime($stats[10])), "\n"; I'm sorry, that's not

Error from a `cmd` sent to a subroutine?

2002-02-15 Thread Paul Farley
Hi all, I'm trying to figure this out, I'd appreciate any help. I have an application that I am using a perl script to do pattern matching and then execute commands specific to that application. I need a way to handle an error in my script if one of the `cmd blah`; doesn't work and send it to an

Re: Error from a `cmd` sent to a subroutine?

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Paul Farley wrote: > I have an application that I am using a perl script to do pattern matching > and then execute commands specific to that application. I need a way to > handle an error in my script if one of the `cmd blah`; doesn't work and send > it to an error subroutin

text file database question

2002-02-15 Thread Hughes, Andrew
I have been given the task to create a contest for which appox. 90,000 people might be signing up(collected info: name, company, email, phone, address1, address2). Due to various reasons, I am not able to use a true database like mySQL to store the information. At this point I am going to have t

Re: octal file permissions

2002-02-15 Thread Randal L. Schwartz
> "Zentara" == Zentara <[EMAIL PROTECTED]> writes: Zentara> After putting on the dunce cap and typing 100 times: Zentara> "the oct function takes a decimal value and returns octal, Zentara> and (stat file)[2] returns a decimal value" I finally see it. Zentara> I think I do anyways. :-) No

RE: text file database question

2002-02-15 Thread Nikola Janceski
Ouch... 90,000 is pushing it. You would have to be very careful not to dump all that info to memory, (start learing how to use seek, tell and $. ). As for your multiple entries, either check for multiple entries and/or use flock on the file. If you lock the file then only one thing can go in at a

Re: @INC

2002-02-15 Thread Jeff 'japhy' Pinyan
On Feb 15, Pam Derks said: >Am trying to find out what modules have been installed on my system. I >know they're stored in the @INC array, but how do I find out which ones >they are? I've got a program that can be run from the web OR from the command-line to list them for you. http://www.pobo

Re: convert ctime to a string

2002-02-15 Thread walter valenti
Dermot Paikkos wrote: >That has worked a treat. >2 more Qs. > >1) Do we summarize solutions and send them to the mail list? > Why no ??? > > >2) What do they call that method of getting variable for a module? > localtime is UNIX time, adapted for zone time, sec,min,hour, methods are obvious. d

Re: Error from a `cmd` sent to a subroutine?

2002-02-15 Thread Farley Paul J Contr 78 CS/SCBN
That worked like a champ! Thanks! Here's what I ended up with: #this one should fail system("wsub \@ProfileManager:Garbage \@Endpoint:$ep", @args)==0 or exception($ep); #This one should work system("wsub \@ProfileManager:ZZ-Paul-aft_test.pm \@Endpoint:$ep",@args)==0 or exception($ep);

Re: octal file permissions

2002-02-15 Thread Randal L. Schwartz
> "Michael" == Michael Fowler <[EMAIL PROTECTED]> writes: Michael> Heh, you still have that backwards. oct() interprets its argument as an Michael> octal value, and returns its decimal equivalent. Interesting that you use "decimal" here... Michael> Also, it's best not to think of functions

unsupported function

2002-02-15 Thread Lanceo
I am getting this weird error message: The Unsupported function alarm function is unimplemented at SiteTest.pm line 42. here is the code: alarm 20; I also get this error in any other module that I call that use larm( Net::Ping for example) Now, I always thought that the alarm function was pa

multiple __DATA__ entries possible?

2002-02-15 Thread zentara
Is it possible to have multiple __DATA__ entries in a program. I can seem to find a way to end __DATA__, and @array is getting everything. How to I end __DATA__? Like: @array = ; @array1 = ; __DATA__ stuff more stuff __DATA1__ stuff more stuff -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: convert ctime to a string

2002-02-15 Thread Bob Showalter
> -Original Message- > From: Dermot Paikkos [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 15, 2002 11:06 AM > To: [EMAIL PROTECTED] > Subject: convert ctime to a string > > > Hi Gurus, > > SYS stuff: perl 5.005 on TRU64 UNIX or > activeperl 5.6 on Win32. > >

More string manipulation

2002-02-15 Thread Brian Johnson
I have the following code that I need a little advice on. The $record->{month} returns the month in integer format (ie 1, 2, 3), I need to change it to to a three letter string (ie Jan, Feb, Mar) foreach $item (@items) { my $record; my $test; foreach $record (@{$PDB->{records}}) {

RE: More string manipulation

2002-02-15 Thread Timothy Johnson
You could try making an array or hash with the months(I used an array because the index is already numeric): @mons = ('Nul','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','De c'); #convert the date $threeLetterMonth = $mons[$record->{month}]; -Original Message-

Re: octal file permissions

2002-02-15 Thread Randal L. Schwartz
> "Tanton" == Tanton Gibbs <[EMAIL PROTECTED]> writes: Tanton> To change from decimal to octal, you can use sprintf with a %o format string Tanton> my $val = sprintf( "%o", 8 ); Tanton> print $val; Tanton> 10 No, this changes from a *number*, which you have typically typed in decimal, to an

Re: unsupported function

2002-02-15 Thread Michael Fowler
On Fri, Feb 15, 2002 at 05:02:22PM -, Lanceo wrote: > I also get this error in any other module that I call that use > larm( Net::Ping for example) Now, I always thought that the alarm function > was part of core Perl. It is, but it requires support from the operating system to work. Your O

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Michael Fowler
On Fri, Feb 15, 2002 at 12:06:22PM -0500, zentara wrote: > Is it possible to have multiple __DATA__ entries in a program. No. > I can seem to find a way to end __DATA__, and @array is getting > everything. How to I end __DATA__? __DATA__ ends at EOF. The only alternative I can think of at t

Re: More string manipulation

2002-02-15 Thread Andrea Holstein
In article <00bb01c1b645$0b8eef80$[EMAIL PROTECTED]> wrote "Brian Johnson" <[EMAIL PROTECTED]>: > I have the following code that I need a little advice on. It'e easier for us all, if you short describe your problem. I assume that the following contains some errors, you can't find. > > The $re

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Zentara" <[EMAIL PROTECTED]>: > Is it possible to have multiple __DATA__ > entries in a program. I can seem to find > a way to end __DATA__, and @array is > getting everything. How to I end __DATA__? > > > Like: > > @array = ; > @array1 = ; > > __DATA_

Re: printing "\n" automagically?

2002-02-15 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Dennis G. Wicks" <[EMAIL PROTECTED]>: > Greetings; > > Is there any easy way to get print to do a "\n" without coding it explicitly? > > Most of the code fragments posted don't have any line feeds in the print statements >and without > them the output gets

RE: Mail::Sender on WinNT - can't connect

2002-02-15 Thread murphy, daniel (BMC Eng)
> > I get, > > connect() failed: Unknown error Jenda said: Does that server accept SMTP ? If you try telnet srmontana 25 do you connect and get a reply something like: 220 srmontana.emc.com MS Exchange ESMTP server ready. If not you'll have to find another server to relay th

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Jeff 'japhy' Pinyan
On Feb 15, zentara said: >Is it possible to have multiple __DATA__ >entries in a program. I can seem to find >a way to end __DATA__, and @array is >getting everything. How to I end __DATA__? Sounds like you might want the Inline::Files module. If you don't want that overhead, though, you can

Re: text file database question

2002-02-15 Thread Lanceo
Perl has access to the UNIX DBM database. You might want to try that if you are using a UNIX variant. "Andrew Hughes" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have been given the task to create a contest for which appox. 90,000 > people might be signi

Re: Latest build of Perl

2002-02-15 Thread Lanceo
ActivePerl 631 "Ned Cunningham" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have Build 628 of PERL for NT. > > Is this the latest and greatest?? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Dennis G. Wicks
That would be great! Unfortunately, none of the fragments posted so far work as written! Looking forward to testing your solution! Thanks, Dennis >}On Feb 15, 13:18, "Jeff 'japhy' Pinyan" wrote: >} Subject: Re: multiple __DATA__ entries possible? > >Sounds like you might want the Inline::File

Differences in DBM

2002-02-15 Thread Balint, Jess
Hello, I was wondering what were the differences in different DMB modules, specifically, SDBM, NDBM, ODBM, MLDBM, AnyDBM, and DB? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Getting the proper info from an INI file...

2002-02-15 Thread Chris
Chris wrote: > Jenda Krynicky wrote: > >> From: Chris <[EMAIL PROTECTED]> >> >>> I found some code, on the net, on access an INI file... >>> >> >> There are about 10 different modules for INI files on CPAN. >> I bet they'll be better than some code you found on the net and >> they'

Checking Perl load

2002-02-15 Thread Ned Cunningham
I would be looking for a way to test if perl is loaded on a NT machine. Does anyone have a quick answer or command line to do this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Getting the proper info from an INI file...

2002-02-15 Thread Chris
Chris wrote: > Jenda Krynicky wrote: > >> From: Chris <[EMAIL PROTECTED]> >> >>> I found some code, on the net, on access an INI file... >>> >> >> There are about 10 different modules for INI files on CPAN. >> I bet they'll be better than some code you found on the net and >> they'

RE: Differences in DBM

2002-02-15 Thread Hanson, Robert
There is some info on the AnyDBM_File manpage. http://www.perldoc.com/perl5.6.1/lib/AnyDBM_File.html Rob -Original Message- From: Balint, Jess [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:05 PM To: '[EMAIL PROTECTED]' Subject: Differences in DBM Hello, I was wondering

RE: Checking Perl load

2002-02-15 Thread Hanson, Robert
You can check to see if its in your path by typing "perl -v" at the command line, otherwise just use the search finction, and search for "perl.exe". Rob -Original Message- From: Ned Cunningham [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:19 PM To: '[EMAIL PROTECTED]' Su

RE: Checking Perl load

2002-02-15 Thread Timothy Johnson
You could try checking the $ENV{'PATH'} variable: if($ENV{'PATH'} =~ /perl\\bin/i){ print "Perl found!\n"; }else{ print "Perl not found!\n"; } -Original Message- From: Ned Cunningham [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 11:19 AM To: [EMAIL PROTECTED] Subject:

RE: Checking Perl load

2002-02-15 Thread Ned Cunningham
Yes, except I load the path separately, so it is on the systems. I would need to check it in a bat file remotely. -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:23 PM

RE: Getting the proper info from an INI file...

2002-02-15 Thread Hanson, Robert
My preference is Config::IniFiles. You can see others by searching on CPAN. http://search.cpan.org/doc/WADG/Config-IniFiles-2.27/IniFiles.pm You also can't load files from CPAN using PPM. PPM loads from the ActiveState repositiory only! If you want to use CPAN modules you need to find nmake.e

RE: Checking Perl load

2002-02-15 Thread Hanson, Robert
Then how about "dir /s perl.exe"? Rob -Original Message- From: Ned Cunningham [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:25 PM To: Hanson, Robert; Ned Cunningham; '[EMAIL PROTECTED]' Subject: RE: Checking Perl load Yes, except I load the path separately, so it is on t

RE: Caching Large Data Structures To Disk

2002-02-15 Thread Balint, Jess
Would it be possible to use 'tie' to operate on a large complex data structure from disk? -Original Message- Well, I think some file systems can't handle file bigger than two gig, but I think that is the only limitation (I could be wrong, I don't use dbm for much). On Thu, 2002-02-14 at

RE: Checking Perl load

2002-02-15 Thread Timothy Johnson
You can also check 'HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\ActivePerl\CurrentVersion' to see if it is installed. That will be MUCH quicker, and won't slow down the clients. -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 11:32 AM To: '

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Michael Fowler
On Fri, Feb 15, 2002 at 01:09:32PM -0800, Dennis G. Wicks wrote: > Unfortunately, none of the fragments posted so far work as > written! None? The example I gave works just fine. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.c

RE: Regular Expressions - matching the first time

2002-02-15 Thread Russ Foster
> As of Perl 5.6.2 (not released yet), /^(.*?):/ and > /^([^:]*):/ will have the same efficiency (read: speed). If > you're curious, currently /^.*?:/ and /^[^:]*:/ have the same > speed -- it's the capturing that killed .*?, but I have fixed that. Just to be clear, it's the capturing (.*?) o

'argument isn't numeric' error in CGI script

2002-02-15 Thread Jim Witte
Hi, I'm running Apache on a MacOS X (10.1.2) box in IP-loopback mode, and I'm experiementing with a CGI script that acts like a state-machine. I cooked up the example at the bottom of the page. If I run it as is, it runs fine. But if I comment out line 48, which tells &action1 to exit w

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Dennis G. Wicks
Sorry, it doesn't *as written*. It required a ; after @array1 = I revisited it and find that it does work after removing the leading white space from the EOD line. Yeah, it might be nit picking but those are the nits that drive us "beginners" crazy! It apparently doesn't make a differen

Re: multiple __DATA__ entries possible? -- use (a here document)

2002-02-15 Thread William.Ampeh
The closest you can get is to specify "a here document". That is: my @array=(<<"END_DATA" =~ m/^\s*(.+)/gm) stuff in data more stuff data END_DATA ; my @array1=(<<"END_DATA1" =~ m/^\s*(.+)/gm) stuff in data

RE: Caching Large Data Structures To Disk

2002-02-15 Thread Chas Owens
Short answer: Yes. Long answer: You can tie a Perl variable to anything provided you supply the necessary functions. You will have to figure out how you want that data structure to look on disk, which will involve turning references in data and back again. This will be a very large task, espec

fsck

2002-02-15 Thread Jose Vicente
Plese help me , how can I use fsck, because I had some errors. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: beginners Digest 15 Feb 2002 16:00:47 -0000 Issue 686

2002-02-15 Thread Rustagi, Dhiraj
Hello, I would like to know if it is possible to add meta tags through a perl program? I have a SHTML file which calls the Perl program and I want this program to insert meta tags in the HEAD section of SHTML document. Thanks Dhiraj

Re: multiple __DATA__ entries possible?-- A cleaner way

2002-02-15 Thread William.Ampeh
#!{location of Perl} # Main Module -- my @array = &one; my @array1 = &two; print "\n This is DATA:\n@array\n\nThis is array1:\n@array1\n\n"; #- BEGIN SUBS - sub one { my @array=(<<"END_DATA" =~

Re: fsck

2002-02-15 Thread Chas Owens
On Fri, 2002-02-15 at 15:47, Jose Vicente wrote: > Plese help me , how can I use fsck, because I had some errors. > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] Well, "fsck /devicepath/devicename" is how you run fsck, but we need more

fsck

2002-02-15 Thread Jose Vicente
The error is : need terminal for interactive - Original Message - From: "Jose Vicente" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 15, 2002 3:47 PM Subject: fsck > Plese help me , how can I use fsck, because I had some errors. > > > -- > To unsubscribe, e-mail:

Re: fsck

2002-02-15 Thread William.Ampeh
Chas wrote: >>How exactly does this relate to Perl? Well most times the Perl developer is forced to be the Systems Admin, and most people on this list use Linux or some flavor of Unix, so I guess the user figured "why not ask people on this list first?". __ William Ampeh (x393

Re: fsck

2002-02-15 Thread Chas Owens
On Fri, 2002-02-15 at 16:04, Jose Vicente wrote: > The error is : > need terminal for interactive > > Plese help me , how can I use fsck, because I had some errors. > > You might try answering these questions: What is the name and version of your OS? What is your location in relation to

Re: fsck

2002-02-15 Thread William.Ampeh
Always fsck your block devices (/dev/dsk/c#t#d#s#) and not your raw device names (/dev/rdsk/c#t#d#s#). That is: fsck /dev/dsk/c0t1d1s1 fsck /dev/dsk/c0t1d1s2 Also, you must be in maintenance or single user mode (linux single). -- Also, please remember to

Re: fsck

2002-02-15 Thread Michael Fowler
On Fri, Feb 15, 2002 at 04:10:18PM -0500, Chas Owens wrote: > What is the air speed of an unladen swallow? African or European? Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- P.S. Haven't we done this joke before? --

HTML Template and HTML Mason

2002-02-15 Thread William.Ampeh
I am in the process of inheriting a bundle of Perl/HTML code implemented in HTML:Mason and HTML::Template For ease of maintenance I am planning to simply do away with one. The question is "which one?". I have not done much in Mason, but from what I have read, it sounds very promising and make

Re: multiple __DATA__ entries possible?

2002-02-15 Thread Michael Fowler
On Fri, Feb 15, 2002 at 02:32:19PM -0800, Dennis G. Wicks wrote: > Sorry, it doesn't *as written*. > > It required a ; after > @array1 = It required a ; after that statement provided you put statements after it. > I revisited it and find that it does work after removing the > leading wh

More help with my function

2002-02-15 Thread Steven M. Klass
Hi all, Here is a simple script that I am having a heck of a time with. I think it will become apparent what I'm trying to do. Ask a question and validate the answer. &AskQuestion("Enter the hierarchical mode", my @hier = qw/inquiry smart yes/); sub AskQuestion { my $prompt = shift;

RE: fsck

2002-02-15 Thread James Kelty
What is the air speed of an unladen swallow? What? African or European? -James -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:10 PM To: Jose Vicente Cc: perl beginners Subject: Re: fsck On Fri, 2002-02-15 at 16:04, Jose Vicente wr

Re: Caching Large Data Structures To Disk

2002-02-15 Thread Michael Fowler
On Fri, Feb 15, 2002 at 02:34:41PM -0500, Balint, Jess wrote: > Would it be possible to use 'tie' to operate on a large complex data > structure from disk? Certainly. The MLDBM module found on CPAN is good for this. It has a few caveats on usage, which are described in the documentation. Mich

RE: More help with my function

2002-02-15 Thread Wagner-David
Uncertain what you are trying to get from the list: I changed print "$prompt [@_[0]]"; to print "$prompt $_[0]"; and if ( $response eq $answers ){ to if ( $response eq $answers[$i] ){ It ran without any warnings and after I gave correct answer, it quit. Wags ;)

Re: Trying to extract an email address

2002-02-15 Thread Michael Fowler
On Thu, Feb 14, 2002 at 05:45:44PM -0800, Marc Morrison wrote: > I tried the nongreedy modifier grep/@?/ but this > didn't work. ? is a quantifier here, not a non-greedy modifier. The non-greedy modifier only works on quantifiers. To break it down a bit, + * and ? are called quantifiers, becaus

RE: More help with my function

2002-02-15 Thread James Kelty
Here is what I came up with.. #!/usr/bin/perl -w use strict; my @heir = qw/inquiry smart yes/; my $response = ""; while ($response eq "") { print "Enter the hierarchical mode [$heir[0]]: "; chomp($response = ); if(($response eq "") || ($response eq "?")) { print "Valid a

Re: More help with my function

2002-02-15 Thread Steven M. Klass
Hi all, Doh!! It must be MONDAY!! I am such an IDIOT!! Couple of questions. How did changing $prompt [@_[0]] to $prompt $_[0] fix it? I mean why didn't $_[0] put the prompt. Let me guess shift removed it from the stack.. I know that if I want the first variable of @answers I can call it w

SPLIT

2002-02-15 Thread Agustin Rivera
How would I keep the character (or characters) that I am splitting by? for example, @tags=split(/>/, $line); I would like to keep the ">". Appreciative, Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

RE: More help with my function

2002-02-15 Thread Wagner-David
Unsure. I always run with warnings and I was told it was better to use $_[0] vs @_ . The message there was Scalar value @_[0] better written as $_[0] On the second it comes back with msg: Scalar value @answers[$i] better written as $answers[$i] So I did. Wags ;) ---

Re: SPLIT

2002-02-15 Thread Brett W. McCoy
On Fri, 15 Feb 2002, Agustin Rivera wrote: > How would I keep the character (or characters) that I am splitting by? > > for example, > > @tags=split(/>/, $line); > > I would like to keep the ">". In other words, you have the string 'blah>bluh>blug>', you want to split it, and end up with ("blah>

  1   2   >