Re: Detecting if a pipe exists

2001-08-21 Thread Michael Fowler
On Wed, Aug 22, 2001 at 11:09:13AM +0530, Karthik Krishnamurthy wrote: > wouldn't it be better to check ARGV to see if arguments have been > passed. if input. else read on STDIN. You missed his last example: On Tue, Aug 21, 2001 at 03:44:05PM -0400, Andrew G.McArthur wrote: > cat numbers.list |

Re: Detecting if a pipe exists

2001-08-21 Thread Karthik Krishnamurthy
wouldn't it be better to check ARGV to see if arguments have been passed. if so use that as input. else read on STDIN. /kk On Tue, Aug 21, 2001 at 12:10:22PM -0800, Michael Fowler wrote: > On Tue, Aug 21, 2001 at 03:44:05PM -0400, Andrew G.McArthur wrote: > > > squareroot 100 1000 25 > > > >

Re: Reading from a large file (CISCO master MIB)

2001-08-21 Thread Karthik Krishnamurthy
the correct way would be to form a small grammer and parse it. there is an article on using Parse::RecDescent for parsing. however this seems really trivial. you can handcode it easily. for example something like sub tokenize { until (defined ($token = shift (@tokens)) {

Re: two .pl use each other?

2001-08-21 Thread Akshay Arora
in this case you might consider using modules so, then you can do something like this in x1.pl use SOME_PACKAGE_NAME; $obj = new SOME_PACKAGE_NAME; #do x1 stuff $obj->call_x2_functions($arg1, $arg2); #call various functions to do x2 things print "some output"; #done with program other things

Re: Having a problem with sendmail

2001-08-21 Thread Craig S Monroe
Wow, do I feel stupid. Did I mention my daughter is teething? Not all of my synapses are firing. Thanks... back under my rock... Craig [EMAIL PROTECTED] http://www.msbwebdesign.com Pager Numeric: 1-877-895-3558 Email pager: [EMAIL PROTECTED]

RE: Help request for backup perl script - how to make it wait

2001-08-21 Thread Gary L. Armstrong
OK, I have been reading the Learning Perl book but I think I know this one. The system() function should wait for the process to finish before moving on (read this a couple days ago, might be misremembering it) but for really fine control you can use the fork() then exec(), and maybe throw in a wa

two .pl use each other?

2001-08-21 Thread Jennifer Pan
I have two perl programs x1.pl and x2.pl In x1.pl, I really want to call x2.pl as a function to finish the task, is there a way to pack them so they can use one another? thank you! -Jennifer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Help request for backup perl script

2001-08-21 Thread Gibbs Tanton - tgibbs
You probably want a semicolon instead of the pipe exec("tar -z -cf area.tgz ../Mud/area/; cp area.tgz archive/area_$backupdate.tgz"); I didn't see the original post, but you might want to consider using system instead of exec. You cannot do anything after an exec except for check its return stat

Help request for backup perl script

2001-08-21 Thread Duston S. Horacek
Spoke to soon as to my problem beign solved, what is happening now is that the tar/zip operations are still running when my script copies ythe files and dates them for the archive folder, the working part of the script is something like exec("tar -z -cf area.tgz ../Mud/area/ | cp area.tgz archiv

Re: Having a problem with sendmail

2001-08-21 Thread Maxim Berlin
Hello Craig, Wednesday, August 22, 2001, Craig S Monroe <[EMAIL PROTECTED]> wrote: CSM> The script completes, but the mail is never sent. CSM> I do not receive any errors.. CSM> #! /usr/bin/perl -w CSM> use strict; CSM> my $from = "mailer\@testsite\.com"; CSM> my $email = "cmonroe11\@mediaone

RE: Hash of structures not working in latest Perl build on Window s?

2001-08-21 Thread Gibbs Tanton - tgibbs
Ok...I ran this on Unix with a simplified version and got the same results as you. I'm not too familiar with Class::Struct, but if you specify your print as $AccumHash{$curr_key}->DataDate() instead of $AccumHash{$curr_key}{DataDate} it should work. I'm not sure why the underlying implementation

Re: Having a problem with sendmail

2001-08-21 Thread Paul Johnson
On Tue, Aug 21, 2001 at 06:12:25PM -0400, Craig S Monroe wrote: > The script completes, but the mail is never sent. > I do not receive any errors.. Have you checked your mail logs? > #! /usr/bin/perl -w > > use strict; > > my $from = "mailer\@testsite\.com"; > my $email = "cmonroe11\@mediaone\

Re: split a file

2001-08-21 Thread Dan Grossman
Pedro, On Tue, 21 Aug 2001, Pedro A Reche Gallardo wrote: > Hi All, I have a file (see below) that I would like to split in three > files: One file for the information under "Alignment (DIALIGN > format)", another for the information under the line "Alignment (FASTA > format)" and a third o

Re: FW: hash, key value

2001-08-21 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 21, Jennifer Pan said: >> $value1 --> @list1 >> $value2 --> @list2 >> %hash{key} = $value3 -->@list3 >> $value4 --> @list4 >> $value5 --> @list5 Well, you want a reference to an anonymous array [ ... ] that holds references to ot

Re: FW: hash, key value

2001-08-21 Thread register
Can u clarify your question ... what is value1..6 ... it looks like you are trying to create a hash of references to arrays .. in which case value1 to 6 does not come into play at all my %hash $hash{key1}->[\@list1,\@list2,\@list3] $hash{key2}->[\@list4,\@list3,\@list1] to dereference the second

Re: What just happened

2001-08-21 Thread Curtis Poe
--- "Jos I. Boumans" <[EMAIL PROTECTED]> wrote: > just print out $self > it will tell you what it is > > -Jos > > Is the new_bp_handler_config_t(@args) a new array reference or a new > hash ?? > > > > > > > > sub new { > > my $self = shift; > > my @args = @_; > > $self = Net

split a file

2001-08-21 Thread Pedro A Reche Gallardo
Hi All, I have a file (see below) that I would like to split in three files: One file for the information under "Alignment (DIALIGN format)", another for the information under the line "Alignment (FASTA format)" and a third one for the information under sequence tree. Any help to do this will

FW: hash, key value

2001-08-21 Thread Jennifer Pan
> -Original Message- > From: Jennifer Pan > Sent: Tuesday, August 21, 2001 6:08 PM > To: '[EMAIL PROTECTED]' > Subject: hash, key value > > Dear all: > I would like to construct a hash, the value of each key is a bunch of > refs to lists > > $value1 -->

Having a problem with sendmail

2001-08-21 Thread Craig S Monroe
The script completes, but the mail is never sent. I do not receive any errors.. #! /usr/bin/perl -w use strict; my $from = "mailer\@testsite\.com"; my $email = "cmonroe11\@mediaone\.net"; my $subject = "This is a test mail"; my $messagebody = ""; my $mail_program; # Initiate the email to the

RE: Hash of structures not working in latest Perl build on Window s?

2001-08-21 Thread Ron Rohrssen
There aren't any error messages. On the older Perl versions it will print out data stored in the structure. (i.e. DataDate in the example code). On the newer version 5.6.1, every data field in the structure is "" (empty string). Although, I can loop through the hash and correctly retrieve the key

RE: Hash of structures not working in latest Perl build on Windows?

2001-08-21 Thread Gibbs Tanton - tgibbs
What does it not do...what did it used to do...are there any error messages or warnings now? -Original Message- From: Ron Rohrssen To: Perl Beginners Sent: 8/21/2001 3:49 PM Subject: Hash of structures not working in latest Perl build on Windows? I have a section of code the works on Wi

Re: Check to see if process exists

2001-08-21 Thread Jeffl
Hey Hans, Go check out a program written by Evan Borgstrom, it is a program written in perl that will check to see if a program is up, and email you the status.. It runs as a cron job. Also you can add additional services quite easily. Author: Evan Borgstrom Email : syntec at unixpimps.org WWW

Re: What just happened

2001-08-21 Thread Jos I. Boumans
just print out $self it will tell you what it is -Jos - Original Message - From: "Tom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 11:17 PM Subject: What just happened > > Is the new_bp_handler_config_t(@args) a new array reference or a new hash ?? > >

Re: Check to see if process exists

2001-08-21 Thread smoot
> Bob Showalter <[EMAIL PROTECTED]> said: > Use backticks to capture the ps -ef output and search for > sendmail. I wouldn't send the ps|grep pipeline to the backticks, > because on my system the ps output includes the grep command, > which might give a "false positive". > >print "sendmail i

What just happened

2001-08-21 Thread Tom
Is the new_bp_handler_config_t(@args) a new array reference or a new hash ?? sub new { my $self = shift; my @args = @_; $self = Netc::new_bp_handler_config_t(@args); return undef if (!defined($self)); . . . thanks

Re: grep

2001-08-21 Thread Craig S Monroe
I would agree.. Janice? Craig [EMAIL PROTECTED] http://www.msbwebdesign.com Pager Numeric: 1-877-895-3558 Email pager: [EMAIL PROTECTED] -- You will never find time for anything. If you want time, you must make it. Charles Buxt

Re: grep

2001-08-21 Thread Brett W. McCoy
On Tue, 21 Aug 2001, Brett W. McCoy wrote: > > This language sounds HIGHLY suspect of homework. > > And if they are C source files, there isn't supposed to be any spaces or > tabs before or after the #define string -- it has to be flush left with no > spaces between # and define. Well, that's no

RE: Check to see if process exists

2001-08-21 Thread Rogers, Gary (AP- Server Adminstrator)
$isalive = system "ps -ef | grep sendmail | grep -v grep"; if ($isalive) { do something } else { do somethingElse } -Original Message- From: Baartmans, Hans [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 2:04 PM To: [EMAIL PROTECTED] Subject: Check to see if pr

Re: grep

2001-08-21 Thread Brett W. McCoy
On Tue, 21 Aug 2001, Jeff 'japhy/Marillion' Pinyan wrote: > >What regular expression would you pass to the grep (1) program to > >search for all the #define statements in file? Remember that there can > >be spaces or tabs both before and after the # sign. > > This language sounds HIGHLY suspect o

Re: grep

2001-08-21 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 21, Janice Pickron said: >What regular expression would you pass to the grep (1) program to >search for all the #define statements in file? Remember that there can >be spaces or tabs both before and after the # sign. This language sounds HIGHLY suspect of homework. -- Jeff "japhy" Pi

RE: Detecting if a pipe exists

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Michael Fowler [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 4:39 PM > To: Bob Showalter > Cc: '[EMAIL PROTECTED]' > Subject: Re: Detecting if a pipe exists > > > On Tue, Aug 21, 2001 at 04:06:11PM -0400, Bob Showalter wrote: > > You might use -

Hash of structures not working in latest Perl build on Windows?

2001-08-21 Thread Ron Rohrssen
I have a section of code the works on Win 98 and NT using Perl version 5.005_03. However, the same code does not work under Win NT using Perl version 5.6.1. Can someone help me identify why this does not work in the latest Perl version? Here is a code snippet. --- #Create the hash with

Re: Detecting if a pipe exists

2001-08-21 Thread Michael Fowler
On Tue, Aug 21, 2001 at 04:06:11PM -0400, Bob Showalter wrote: > You might use -t to see if STDIN is a tty, but that wouldn't work for > >$ cat >sq.sh >squareroot 100 >$ sh sq.sh # STDIN is a tty, but should I read input? I'm not seeing the purpose behind this example. You'

Re: help - what is this?

2001-08-21 Thread Quang Bui
OK, people. I get the clue after receiving a message from Kevin Meltzer. You can stop now. No more html questions, are you happy now? On Tue, 21 Aug 2001, Mel Matsuoka wrote: > At 04:05 PM 08/21/2001 -0400, Quang Bui wrote: > >I know this is a perl mailing list, but HTML is somewhat related >

RE: Check to see if process exists

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Baartmans, Hans [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 4:04 PM > To: [EMAIL PROTECTED] > Subject: Check to see if process exists > > > Is there good way to execute a UNIX 'ps' command from Perl > and check to see > if a process is runnin

Re: help - what is this?

2001-08-21 Thread Mel Matsuoka
At 04:05 PM 08/21/2001 -0400, Quang Bui wrote: >I know this is a perl mailing list, but HTML is somewhat related >since they're both used in web development. Java, Python and C++ are all used in "web development" as well, but questions about these technologies are very obviously off-topic here. A

Re: Detecting if a pipe exists

2001-08-21 Thread Michael Fowler
On Tue, Aug 21, 2001 at 03:44:05PM -0400, Andrew G.McArthur wrote: > > squareroot 100 1000 25 > > > cat numbers.list | squareroot > > > cat numbers.list | squareroot 25 144 > > I've had no problem with the second two examples, but the first waits > for input from the STDIN. How can I get m

Re: help - what is this?

2001-08-21 Thread Kevin Meltzer
Hi Quang, This is not the appropriate list for HTML questions. HTML and Perl, if related, would be distant cousins, twice removed, and adopted. Please search the web for a more appropriate place to find an answer. Thanks. Cheers, Kevin On Tue, Aug 21, 2001 at 04:05:33PM -0400, Quang Bui ([EMAIL

RE: Detecting if a pipe exists

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Andrew G.McArthur [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:44 PM > To: [EMAIL PROTECTED] > Subject: Detecting if a pipe exists > > > Dear all, > > I'm developing a perl program in UNIX that I want to > sometimes work on > data from the

help - what is this?

2001-08-21 Thread Quang Bui
I know this is a perl mailing list, but HTML is somewhat related since they're both used in web development. My instructor took points off of my HTML project because he said the following does not count as a body tag. What do you guys think? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Check to see if process exists

2001-08-21 Thread Baartmans, Hans
Is there good way to execute a UNIX 'ps' command from Perl and check to see if a process is running or exists? For instance, I would like to check to see if Sendmail is running. Under a UNIX shell command you can execute, '/usr/bin/ps -ef | grep sendmail'. Is there an easy way to do this in Per

Detecting if a pipe exists

2001-08-21 Thread Andrew G . McArthur
Dear all, I'm developing a perl program in UNIX that I want to sometimes work on data from the pipe, sometimes from the command line, and sometimes both. For example, consider the hypothetical program "squareroot". I would like to use it in the following three ways from the command prompt:

RE: grep

2001-08-21 Thread Rogers, Gary (AP- Server Adminstrator)
You might want to use egrep, it handles regex's a little better than straight grep. You could try something like ^(\s)\#(\s)define -Original Message- From: Janice Pickron [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 1:26 PM To: [EMAIL PROTECTED] Subject: grep What reg

RE: grep

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Janice Pickron [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:26 PM > To: [EMAIL PROTECTED] > Subject: grep > > > What regular expression would you pass to the grep (1) program to > search for all the #define statements in file? Remember that

RE: DBI access inside a module

2001-08-21 Thread Bob Showalter
> -Original Message- > From: MECKLIN, JOE (ASI) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:21 PM > To: '[EMAIL PROTECTED]' > Subject: DBI access inside a module > > > I'm trying to open a database in my main program, pass 3 > arguments to this > module (list of field

RE: DBI access inside a module

2001-08-21 Thread Gibbs Tanton - tgibbs
You probably want to pass in the $dbh variable to the build_lookup_table function. #in main... my ($lookup_colist) = build_lookup_table($dbh, "clli", "common_co_list", "order by clli"); #in DBGet.pm sub build_lookup_table { my $dbh = shift; #...same as before. } -Original Message- F

grep

2001-08-21 Thread Janice Pickron
What regular expression would you pass to the grep (1) program to search for all the #define statements in file? Remember that there can be spaces or tabs both before and after the # sign.

DBI access inside a module

2001-08-21 Thread MECKLIN, JOE (ASI)
I'm trying to open a database in my main program, pass 3 arguments to this module (list of field names, table name and additional SQL arguments) then retrieve and forward the data to a waiting variable in the main program. Every time I run it from a command line I get the following message: Can't

Re: Redirect error of shell command

2001-08-21 Thread Matthew Lyon
in UNIX, when piping this stuff to a file I've had better luck sabotaging STDERR and STDOUT's handles, (while dumping them into a file.) On Tue, 21 Aug 2001, Luke Bakken wrote: > Which shell? Which operating system? Where do you want it to go? > > To redirect STDERR to oblivion on NT: > > system

Re: Redirect error of shell command

2001-08-21 Thread Luke Bakken
Which shell? Which operating system? Where do you want it to go? To redirect STDERR to oblivion on NT: system "command > nul"; On UNIX: system "command 2> /dev/null" On Tue, 21 Aug 2001, Janice Pickron wrote: > Hello Perl Guru! > > How do you redirect the standard error of a shell command?

RTF Blob to HTML output

2001-08-21 Thread Scott Taylor
Hi all, I have a database with a blob field that contains RTF format and I'm trying to get HTML output, I'm using a module from CPAN called RTF::Parser but there doesn't seem to be a lot of docs for it. So, here is the loop that returns output from the SQL statement, can anyone help me get $t

Re: Redirect error of shell command

2001-08-21 Thread Brett W. McCoy
On Tue, 21 Aug 2001, Janice Pickron wrote: > How do you redirect the standard error of a shell command? cmd 2>&1 -- Brett http://www.chapelperilous.net/ FORTUNE REMEMBERS THE GREAT

Redirect error of shell command

2001-08-21 Thread Janice Pickron
Hello Perl Guru! How do you redirect the standard error of a shell command? Thanks!

Re: comparing hash values

2001-08-21 Thread Michael Fowler
On Tue, Aug 21, 2001 at 11:12:55AM -0700, Wagner-David wrote: > You can do: > > if ( exists $hash{$Key} ) { > # the key exists, so do your check >}else { > # key does not exist, so add to hash >} > > Also can use defined, but depe

RE: Perl script editor for NT/2000

2001-08-21 Thread Jonathan M. Morgan
Does anyone use HomeSite? I origianlly used it for HTML and have since started learning Perl... -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Perl script editor for NT/2000 On Mon, 20 Aug 20

the get function does not work!

2001-08-21 Thread Chuck Wrobel
I just installed libwww (v5.53_95) and am using perl (5.6.1) on cygwin (installed latest version yesterday). I can't get the 'get' function to work in the following simple program: #!/usr/bin/perl use LWP::Simple; print (get "http://www.google.com";); Other LWP such as getprint and getstore work

Sorry

2001-08-21 Thread Miriam Hadary
I apologize for that e-mail earlier, the problem is looking very promising and I hope this time it works! I would like to thank those who tried to help and shun those who gave nasty comments like I'm stupid or something! Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Reading from a large file (CISCO master MIB)

2001-08-21 Thread Craig Moynes/Markham/IBM
Hi all, I have been tasked with reading and parsing a large MIB file. I eventually have to create the traps but that's beyond this post. Currently I am looking for a certain line of text, and for the most part what I have written works. Looking for lines similar to this: dot3ChipS

RE: comparing hash values

2001-08-21 Thread Wagner-David
You can do: if ( exists $hash{$Key} ) { # the key exists, so do your check }else { # key does not exist, so add to hash } Also can use defined, but depending on how accessing there is auto-vivfying(sp), which may create(i

comparing hash values

2001-08-21 Thread Darfler, Jim (J.E.)
I am trying to populate a hash with key/value pairs, basically the file name and its dates. I am extracting part of the file name to use as the key. Some of the keys will be the same. I want to put a new value in only if its newer than the value currently stored. My problem is, how do I know

RE: GET ME OFF

2001-08-21 Thread Matthew Lyon
==> getoff.pl #!/usr/bin/perl -w print "You have gotten off\n."; --- mL On Tue, 21 Aug 2001, Dean Theophilou wrote: > Actually, you DO sound like him. Even more importantly, however, you have > to be careful with the language used in the subject line. That could get > someone in trouble. :

RE: GET ME OFF

2001-08-21 Thread Dean Theophilou
Actually, you DO sound like him. Even more importantly, however, you have to be careful with the language used in the subject line. That could get someone in trouble. :)) Dean -Original Message- From: Miriam Hadary [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 10:33 AM T

Re: Upload script

2001-08-21 Thread Curtis Poe
--- Lynn Glessner <[EMAIL PROTECTED]> wrote: > The name of my upload file isn't literally file, it is contained in the > variable named file. I agree that the upload method is probably my problem; > someone else said it was just buggy. :( I don't necessarily know that this method is buggy. I was

Re: GET ME OFF

2001-08-21 Thread Carl Rogers
This *should* get you off: To unsubscribe, e-mail: [EMAIL PROTECTED] If it doesn't, let the list guru's know and they can work their magic. PS: I wondered if I was reading the subject line correctly:) At 07:33 PM 8/21/2001 +0200, Miriam Hadary wrote: >DEAR EVERYONE, > >I HAVE REALLY TRIED TO

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-21 Thread Dean Theophilou
>PS I guess that Ice Kobolds programmed in SNOBAL, others spoke with a LISP, >and all of us were playing an RPG, looking for Perls and other treasure, >skipping school and getting C's in class(es) > >How's that for programming language alliteration? Not bad, but I think you missed out on the

[ADMIN] Re: GET ME OFF

2001-08-21 Thread Kevin Meltzer
List, I have responded privately to Miriam. Please do not respond to her(?) or to the list on this. In the future if any of you (or anyone reading this in the archives) is having troubles unsubscribing by following the directions on the bottom of the emails, the website (learn.perl.org), and the

GET ME OFF

2001-08-21 Thread Miriam Hadary
DEAR EVERYONE, I HAVE REALLY TRIED TO GET OFF THIS FORUM BUT TO NO AVAIL. I DON'T MEAN TO SOUND LIKE THAT JOHN CHARACTER WE HAD ON A LITTLE WHILE AGO BUT PLEASE GET ME OFF -Original Message- From: Gene Martin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, Augus

Re: Upload script

2001-08-21 Thread Lynn Glessner
Hmm, how did my message end up on both lists, I meant to just send it to the CGI list? Sorry for the extra noise. But now that it's started, I'll reply to both in case people are following it. The name of my upload file isn't literally file, it is contained in the variable named file. I agree tha

Re: Upload script

2001-08-21 Thread register
I dont use CGI.pm a whole lot but looking at the perldocs for CGI.pm it mentions that upload method takes the name of the upload field. Looking at the example in the POD it appears that you should be calling upload like this my $fh = $q->upload( 'file' ); instead of

OEM2ANSII

2001-08-21 Thread Harald Grams
What is the best possibility in perl to convert a text file from OEM to ANSII charset and reverse? Is there a module<-->function? If yes, what's its name? Thanks in advance Harald -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: passing command line args into a scalar/array

2001-08-21 Thread register
I have not used Getopt for a long time but I think the answer to your problem does not exactly lie with Perl ... it is probably more shell related ... if u put yourself in the shoes of the shell interpreter and look at the commandline u mentioned below then why would u think that tac and toe were

RE: Turning off warnings causes scripts to fail

2001-08-21 Thread Curtis Poe
It was the ^M at the end of the shebang line that was causing things to fail. Seems someone uploaded a zipped file and extracted the archive without bothering to fix the line endings! Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://w

passing command line args into a scalar/array

2001-08-21 Thread Salvador Lopez
Using Getopt::Long, how can i pass a value that is a list into an scalar or array? In the following example, I would like 'tic tac toe' to be assigned to a scalar or array variable. ./perlscript.pl --arg1 foo --arg2 tic tac toe GetOptions( "arg1:s" => \$arg1, "arg2:s" => \$arg2); # $arg1 now co

Re: question concerning signed char

2001-08-21 Thread smoot
> [EMAIL PROTECTED] said: > I go this from some mailing list ... dont know if it helps but for what it is > worth ... > > In C, a char is a kind of integer, and so there is such a thing as an "unsigned >char". > > In C, "char" can mean either "unsigned char" or "signed char", > depen

RE: question concerning signed char

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Paul Johnson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 9:37 AM > To: Bob Showalter > Cc: '[EMAIL PROTECTED]' > Subject: Re: question concerning signed char > > > On Tue, Aug 21, 2001 at 09:24:06AM -0400, Bob Showalter wrote: > > > a signed

RE: inquiry

2001-08-21 Thread Crowder, Rod
> -Original Message- > From: webmaster [mailto:[EMAIL PROTECTED]] > Sent: 21 August 2001 14:48 > To: perl > Subject: inquiry > > > what does > Global symbol "@ARG" requires explicit package name at > testbio1.pl line 4. > Global symbol "$sbjct_scr" requires explicit package name at >

Re: inquiry

2001-08-21 Thread Brett W. McCoy
On Tue, 21 Aug 2001, webmaster wrote: > what does > Global symbol "@ARG" requires explicit package name at testbio1.pl line 4. > Global symbol "$sbjct_scr" requires explicit package name at testbio1.pl > line 29 > . > Global symbol "%query_conunts" requires explicit package name at > testbio1.pl

RE: inquiry

2001-08-21 Thread John Edwards
$ARGV[0] not $ARG[0] You have defined $sbjct_scr, yet are attempting to use $sbjct_srs You have defined %query_counts, yet are attempting to use %query_conunts You are attempting to use the while() command, yet are calling it wile... Typos and code don't mix. Ever. Learn to proof read your e-

RE: problem with filtering a corpus

2001-08-21 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 21, Gibbs Tanton - tgibbs said: >You may want to try $` $& and $' >my $string = 'abcdefhij'; >$string =~ /(def)/; >print "$`:$&:$'"; > >**this prints: abc:def:hij > > >However, use of $`, $&, and $' will slow down ALL of your regular >expressions. Which is why, in Perl 5.6, we have the @-

inquiry

2001-08-21 Thread webmaster
what does Global symbol "@ARG" requires explicit package name at testbio1.pl line 4. Global symbol "$sbjct_scr" requires explicit package name at testbio1.pl line 29 . Global symbol "%query_conunts" requires explicit package name at testbio1.pl lin e 46. Global symbol "$sbjct_srs" requires expli

RE: problem with filtering a corpus

2001-08-21 Thread Gibbs Tanton - tgibbs
You may want to try $` $& and $' my $string = 'abcdefhij'; $string =~ /(def)/; print "$`:$&:$'"; **this prints: abc:def:hij However, use of $`, $&, and $' will slow down ALL of your regular expressions. -Original Message- From: Pakhun Alhaca To: Michael Fowler Cc: [EMAIL PROTECTED] Sent

RE: Re: formatting

2001-08-21 Thread F.H
Sorry I meant round not round up and this did it: $test = sprintf( "%.4f00", $test); I.S Michael Fowler <[EMAIL PROTECTED]> wrote: >On Mon, Aug 20, 2001 at 12:30:07PM -0400, F.H wrote: >> I am trying to format a number so I get it rounded up to 4 decimals then >> padded with 2 zeros afterwards,

Re: question concerning signed char

2001-08-21 Thread Paul Johnson
On Tue, Aug 21, 2001 at 09:24:06AM -0400, Bob Showalter wrote: > a signed char is an integer data type with a size of one byte. 7 bits are > magnitude and 1 bit for sign (twos-complement). The range is -128 to +127. Technically, "twos complement" ne "sign and magnitude". The difference, in 8 bi

Re: problem with filtering a corpus

2001-08-21 Thread Akshay Arora
I think i know what you are looking for. If so, then there are 2 ways to do this. First you need to match everything before what you are looking for, then match your string, and then match everything after. Now, this will only work if you know _exactly_ what you are looking for. $your_string = "T

RE: [drifting OT]Re: PERL IS NOT A HIGH LEVEL LANGUAGE

2001-08-21 Thread Gene Martin
>>Dean Theophilou [[EMAIL PROTECTED]] wrote >>Yes, that's right, but they program in "Kobol". :)) Then how do they keep all those variables that you have to declare in Cobol (you can't just use a variable in a print out, if you want to suppress zeros and stuff like that). I could never keep all

RE: question concerning signed char

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Stefan Oswald [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 8:53 AM > To: '[EMAIL PROTECTED]' > Subject: question concerning signed char > > > > I´ve read the term "signed char" in a script that i want to analyze. I > checked the cookbook and c

Re: question concerning signed char

2001-08-21 Thread register
I go this from some mailing list ... dont know if it helps but for what it is worth ... In C, a char is a kind of integer, and so there is such a thing as an "unsigned char". In C, "char" can mean either "unsigned char" or "signed char", depending on the platform. (Unlike other kinds

Re: question concerning signed char

2001-08-21 Thread Paul Johnson
On Tue, Aug 21, 2001 at 02:53:24PM +0200, Stefan Oswald wrote: > > I´ve read the term "signed char" in a script that i want to analyze. I > checked the cookbook and cpan and i still have no clue, what that could > mean. perldoc -f pack Then read K&R if it still makes no sense ;-) It's a type i

question concerning signed char

2001-08-21 Thread Stefan Oswald
I´ve read the term "signed char" in a script that i want to analyze. I checked the cookbook and cpan and i still have no clue, what that could mean. I also post the sub which includes the comment for better understanding Maybe someone could give me an idea .. .(also about pack and unpack) t

Re: lost in a maze of hash

2001-08-21 Thread register
On Tue, Aug 21, 2001 at 07:10:50AM -0500, Jerry Preston shaped the electrons to read: > Hi! > > OK, I am trying to build an return a hash: > > $list = " 1 2 3 4 5 6 7 8 9 10"; > > $DAT{ 'heading' } = $list; > > I can print it at this time: > > print "$DAT{ 'heading' }*"; > > or is it be

RE: lost in a maze of hash

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Jerry Preston [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 8:11 AM > To: begginners > Subject: lost in a maze of hash > > > Hi! > > OK, I am trying to build an return a hash: > > $list = " 1 2 3 4 5 6 7 8 9 10"; > > $DAT{ 'heading' } = $

lost in a maze of hash

2001-08-21 Thread Jerry Preston
Hi! OK, I am trying to build an return a hash: $list = " 1 2 3 4 5 6 7 8 9 10"; $DAT{ 'heading' } = $list; I can print it at this time: print "$DAT{ 'heading' }*"; or is it better to do it this way? ( @wafer_list ) = split( /\s+/, $wafer_list ); $DAT{ 'heading' } = @wafer_list; H

Re: problem with filtering a corpus

2001-08-21 Thread Pakhun Alhaca
Dear Perl-friends! Thanks for quite a piece of advice in filtering my huge corpus. Now it is smaller and easy to read thanks to you. I bought "Perl for Beginners" and now I am working on my basic skills. For couple of days I was finding all the answers I wanted from my books but there is a new one

RE: string "cut"

2001-08-21 Thread Steve Howard
If you only have one equals sign dividing what you don't need, and what you are looking for: $string = "interfaces.ifTable.ifEntry.ifInOctets.4 = 954819405"; ($key, $val) = split /=/, $string; Steve H. -Original Message- From: Ask Bjoern Hansen [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

Fwd: Looking for a sound editing perl module

2001-08-21 Thread Nancy Chan
Hi, I'm a newbie of perl cgi. I want to find a perl module (linux) for sound editing eg concatenating n files, mixing 2 or more sound files..Please help!! Nancy ( [EMAIL PROTECTED] ) h ttp://archive.develooper.com/beginners%40perl.org/ ; name="" Content-Transfer-Encoding: BASE64 DQoNCi0tL

Re: string "cut"

2001-08-21 Thread Ask Bjoern Hansen
On Tue, 21 Aug 2001, Herman Cremer wrote: > Hi > I have a string from a snmp get function... > > interfaces.ifTable.ifEntry.ifInOctets.4 = 954819405 > > how can I "CUT" so the value is only 954819405 ? with a regular expression. $string =~ s/.* = //; would be one way to do it. Another way

string "cut"

2001-08-21 Thread Herman Cremer
Hi I have a string from a snmp get function... interfaces.ifTable.ifEntry.ifInOctets.4 = 954819405 how can I "CUT" so the value is only 954819405 ? Thanks HErman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl GUI

2001-08-21 Thread Ray Barker
You can use glade to build your Gnome interface: http://glade.gnome.org/ and then use glade-perl to link to perl http://www.glade.perl.connectfree.co.uk/index.html I've used glade with C and it works pretty well. Trying it with perl is on my things to do list. also look at wxWindows -Origin