Re: Difference between \[^x]*[^a]*

2002-02-15 Thread Eric Beaudoin
At 22:56 2002.02.15, Jim Witte wrote: > What is the difference between \[^x]*[^a]*up a webpage, trying to find paragraph tags followed by list-item tags (some of which >had a space inside the tag), with anything in between, and tried the first >(forgetting off hand the RegExp char for "any char

RE: Win32::RasAdmin

2002-02-15 Thread Veeraraju_Mareddi
Dear Noah, Thanks you very much.It is really working man.Yesterday I have downloaded somany RASMODULES ,But noe of them were working.and giving Doctor Watson Errors. One more help I want from you sir.. Is there any function of RASADMIN to test the Fuctionality of

Difference between \[^x]*[^a]*

2002-02-15 Thread Jim Witte
What is the difference between \[^x]*[^a]* \n

Re: More help with my function

2002-02-15 Thread Francis Henry
I always think "what am I getting as the result of the evaluation of this expression?". In this case, you're asking for the evaluation of element zero in array "array", which is a scalar, so $array[0] means (at least to my little brain) "scalar returned from the zeroth element of array "array""

Re: SPLIT

2002-02-15 Thread John W. Krahn
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 ">". $ perl -le' $, = " * "; $line = q(); print split />/, $line; print split /(>)/, $line; print $line =~ /([^>]*>)/g;

Writing to a file

2002-02-15 Thread Naika - EV1
I'm trying to write to a file from a 5 choice radio form and I keep getting this error Undefined subroutine &main::param called at pollresults_rg.pl line 5. What does that mean? My code is: #!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser); @picks = param("radiobutton"); #write to a file o

Re: 'argument isn't numeric' error in CGI script

2002-02-15 Thread John W. Krahn
Jim Witte wrote: > > 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, wh

arrays and refs...argh!

2002-02-15 Thread Ron Goral
Can someone please tell me why the following code only returns the last element in the referenced array? If I put the foreach routine inside the while loop, I get a printout of each element in both the $sqlRes reference and the $colNames reference. But, if I print outside the while loop, I only

RE: A pinch more help - before the weekend

2002-02-15 Thread James Kelty
if (defined($conf{Hier}) { AskQuestion("Enter mode", my @hier = qw/inquiry smart yes/, $conf{Hier}); } else { AskQuestion("Enter mode", my @hier = qw/inquiry smart yes/); } sub AskQuestion { my $prompt = shift; my @answers = @_; if(defined($_[2])) { my $test = $_

A pinch more help - before the weekend

2002-02-15 Thread Steven M. Klass
Hi all, Ok expanding on our previous function AskQuestion("Enter mode", my @hier = qw/inquiry smart yes/, $conf{Hier}); sub AskQuestion { my $prompt = shift; my @answers = @_; my $test = $_[2]; } The last variable passed is not a sure thing - in other words if it exists it pas

RE: SPLIT

2002-02-15 Thread Nikola Janceski
OR you can do $line = 'blah>bluh>blug>'; @stuff = map { "$_>" } split />/, $line; -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 5:40 PM To: Agustin Rivera Cc: [EMAIL PROTECTED] Subject: Re: SPLIT On Fri, 15 Feb 2002, Agustin Rivera

RE: Caching Large Data Structures To Disk

2002-02-15 Thread Richard Smith
Hi Jess, Tied variables might work, but I was also browsing CPAN this afternoon, and I noticed that there is a whole SAS module under "Commercial Software". I have no idea what it does, but you might find it interesting to look at. Thanx, Smiddy -- To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: More help with my function

2002-02-15 Thread James Kelty
@array[0] does work, but it give you a syntax error like this: @array[0] is better written as $array[0] on line 34 or something. You have to realize that you are referring to an element of the array in scalar context, not in array context. -James -Original Message- From: Steven M. Kl

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>

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 ;) ---

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 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

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: 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 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: 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: 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

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: 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

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: 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? --

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 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
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

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 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

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: 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

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: 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

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: 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

'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: 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

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: 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: 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 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: 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 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: 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 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: 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: 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'

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: 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

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: 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: 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: 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: 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: 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: 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 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: 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: 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-

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: 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. > >

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

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

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: 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: @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: 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: 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: 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

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

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: 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

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: 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

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, 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: 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: @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, >

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: 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

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 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: 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: 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: 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 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: 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

@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]

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]

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: >}

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: 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

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

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: 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

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

  1   2   >