Matching text

2002-02-01 Thread Kevin
Hi I have a really simple problem that I could solve easily with a strstr() call in c but cannot get my head around in perl. I have have the following input. Active Accounted actions on tty57, User fred Priv 1 Task ID 35176, Network Accounting record, 02:04:00 Elapsed what I want to do is

Re: Matching text

2002-02-01 Thread Jon Molin
Kevin wrote: > > Hi > > I have a really simple problem that I could solve easily with a strstr() call > in c but cannot get my head around in perl. > > I have have the following input. > > Active Accounted actions on tty57, User fred Priv 1 > Task ID 35176, Network Accounting record, 02:04:00

Re: perl database access

2002-02-01 Thread Jon Molin
I'm not sure i follow you but if you use localhost or leave the host blank it'll try localhost... /Jon Jefferson Ryan Lee wrote: > > Hi, > > Are there any way to access a database (SQL Server) not using the ODBC? > It is possible for a perl script to query a database not on a local > m

Re: Matching text

2002-02-01 Thread Leon
- Original Message - From: "Kevin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 10:15 PM Subject: Matching text > I have have the following input. > > Active Accounted actions on tty57, User fred Priv 1 > Task ID 35176, Network Accounting record, 02:04:00

fastCGI Perl & memory

2002-02-01 Thread Roman Fordinal
that is full script. it is fastCGI and problem is memory used by this script. after yester run is used memory by script bigger and bigger :( i ned absolute flushing memory from added "modul" (sorry for my english) #!/usr/bin/perl use FCGI; use Mysql; require "default.conf"; require "default.def

Re: More Economic Use of Hash

2002-02-01 Thread Roger C Haslock
Do you want a lexical sort or a numeric sort? foreach my $key ( sort keys %freq ) # lexical foreach my $key ( sort ($a<=>$b) keys %freq ) # numeric - Roger - - Original Message - From: "Balint, Jess" <[EMAIL PROTECTED]> To: "'Roger C Haslock'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Se

translation of logical operators

2002-02-01 Thread Filson
Dear perl mongers. I need to know if I can translate symbols in a text file into logical operators like AND|OR|NOT and so forth. The thing is that I'm trying to build a simulator for digital cuircuts, with input files in 3DML style (ascii graphix style) like this: =A-N> =O> >A- Hrm, a little

PERL and XML Parser

2002-02-01 Thread P0R0NG
Hi list. I'm currently doing a perl project involving XML parser. given this xml snippet: Percy Alice in Chains The Pixies Bob Marley Peter Tosh how can i get the PCDATA for the element "owner"? i want to get just the "owner" elements and the content of the

Re: PERL and XML Parser

2002-02-01 Thread P0R0NG
On Fri, 1 Feb 2002 21:04:54 +0800 P0R0NG <[EMAIL PROTECTED]> wrote: |how can i get the PCDATA for the element "owner"? i want to get just |the "owner" elements and the content of the "owner." | |i've created a code that will trap for the start and end tags of |the element "owner" as well as the

Re: [ma-linux] Just when you thought you are done, the - is there - appears

2002-02-01 Thread William.Ampeh
Thanks to all who responded to my mail, especially Geoff. The best solution, I think, will be for me to throw in a login screen, but this has been ruled out. The IP range solution has lots of question marks, including what Geoff pointed out. I am basically stuck and will need any suggestion (o

RE: html entity conversion... one liner?

2002-02-01 Thread Chas Owens
Just because tmtowtdi (even if it is not very efficient): $item = join '', map { s//>/; $_ } split //, $item; On Thu, 2002-01-31 at 09:51, Chas Owens wrote: > On Thu, 2002-01-31 at 09:39, John Edwards wrote: > > Why *must* it be a one liner. I think my suggestion is easier to understand > > for

Re: [ma-linux] Just when you thought you are done, the - is there - appears

2002-02-01 Thread Jon Molin
I guess geoff is in the ma-linux list, not in here since the only things i can find in this thread is 3 posts by you. Kinda hard to offer better(tm) sollutions when you don't know what's been suggested before...Perhaps you should try NOT cross-posting? /Jon [EMAIL PROTECTED] wrote: > > Thanks t

testing for a dir

2002-02-01 Thread Alex Harris
What is the best way, using rsh, to test if a directory exists on another server? _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: [EMAIL P

change all files in directory

2002-02-01 Thread Booher Timothy B 1stLt AFRL/MNAC
Hello, I am trying to change all files in a directory that contain the strings Satellite satellite and SATELLITE that I need to change to target, Target and TARGET. Because many of these are C++ source files I need to preserve the case. I was thinking of the following script: #!/usr/bin/perl -w

RE: PERL and XML Parser

2002-02-01 Thread Hanson, Robert
There are tons of XML modules, many of which make that sort of thing easy... but it depends on exactly what you want to do. Here are some snippets: use XML::EasyOBJ; my $obj = new XML::EasyOBJ('killme.xml'); foreach ( $obj->albums ) { print $_->owner->getString . "\n"; } -- OR -- use

Re: testing for a dir

2002-02-01 Thread Jason Purdy
Well, I'm not sure about rsh, but with ssh: ssh www.journalistic.com "perl -e 'print ( (-d \"data\") ? \"DIR\n\" : \"Not DIR\n\" );'" Change "data" to whatever your dirname is... Jason If memory serves me right, on Friday 01 February 2002 10:18, Alex Harris wrote: > What is the best way, usi

Re: change all files in directory

2002-02-01 Thread Jenda Krynicky
From: Booher Timothy B 1stLt AFRL/MNAC <[EMAIL PROTECTED]> > Hello, I am trying to change all files in a directory that contain the > strings Satellite satellite and SATELLITE that I need to change to > target, Target and TARGET. Because many of these are C++ source files > I ne

RE: change all files in directory

2002-02-01 Thread Hanson, Robert
Yeah, here is an easy solution, run it right at the command line... (Make a backup of the files first!!) perl -pi -e 's|satellite|target|' *.cpp *.hpp *.asc perl -pi -e 's|Satellite|Target|' *.cpp *.hpp *.asc perl -pi -e 's|SATELLITE|TARGET|' *.cpp *.hpp *.asc Rob -Original Message- Fr

difference between MSI and AS package

2002-02-01 Thread Booher Timothy B 1stLt AFRL/MNAC
One more while I am at it . . . what is the difference between the MSI and the AS package distribution of ActivePerl 5.6.1 on the active state web-site? I don't know which one to download . . . Tim

RE: change all files in directory

2002-02-01 Thread Hanson, Robert
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] > If you keep your code do not forget to add the /g option Oops! perl -pi -e 's|satellite|target|g' *.cpp *.hpp *.asc perl -pi -e 's|Satellite|Target|g' *.cpp *.hpp *.asc perl -pi -e 's|SATELLITE|TARGET|g' *.cpp *.hpp *.asc Rob -- To unsubscrib

RE: difference between MSI and AS package

2002-02-01 Thread Hanson, Robert
The MSI uses the Microsoft installer, which means you can uninstall it. Use that one if you can. The AS package does not include an installer (well maybe a batch script, but I'm not sure). Rob -Original Message- From: Booher Timothy B 1stLt AFRL/MNAC [mailto:[EMAIL PROTECTED]] Sent: F

Re: change all files in directory

2002-02-01 Thread Jeff 'japhy' Pinyan
On Feb 1, Booher Timothy B 1stLt AFRL/MNAC said: >Hello, I am trying to change all files in a directory that contain the >strings Satellite satellite and SATELLITE that I need to change to target, >Target and TARGET. Because many of these are C++ source files I need to >preserve the case. I was t

RE: change all files in directory

2002-02-01 Thread Craig Williams
Somewhat related question: I want to ADD a file extension (there currently none)to all files that start with "FOO" so they will be named FOO.txt Is there a one liner that can accomplish this? -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2

Re: change all files in directory

2002-02-01 Thread Brett W. McCoy
On Fri, 1 Feb 2002, Booher Timothy B 1stLt AFRL/MNAC wrote: > Hello, I am trying to change all files in a directory that contain the > strings Satellite satellite and SATELLITE that I need to change to target, > Target and TARGET. Because many of these are C++ source files I need to > preserve th

UFO (Unidentified Formatting Observation) on the web....

2002-02-01 Thread Ron Goral
I have a very beginner's question. I've just been looking at the code for a library file and noticed some, to me, very peculiar things. First, there is text that is not commented, it is just typed in place. Why does this not interfere with the script? Second, there are expressions like "=pod"

RE: change all files in directory

2002-02-01 Thread Booher Timothy B 1stLt AFRL/MNAC
When I try to run the one-liners I get: Can't open *.cpp: Invalid argument. Can't open *.hpp: Invalid argument. But when I do a dir command I get: target_functions.cpptarget_modules.cpp global_constants.hpp global_header.hpp class_functions.cpp S2b_4.opt Clearly these files a

Re: UFO (Unidentified Formatting Observation) on the web....

2002-02-01 Thread Jeff 'japhy' Pinyan
On Feb 1, Ron Goral said: >I have a very beginner's question. I've just been looking at the code for a >library file and noticed some, to me, very peculiar things. First, there is >text that is not commented, it is just typed in place. Why does this not >interfere with the script? Second, the

Re: UFO (Unidentified Formatting Observation) on the web....

2002-02-01 Thread Jon Molin
it's pod, do 'perldoc module' and 'perldoc perldoc' /jon Ron Goral wrote: > > I have a very beginner's question. I've just been looking at the code for a > library file and noticed some, to me, very peculiar things. First, there is > text that is not commented, it is just typed in place. Why

Re: UFO (Unidentified Formatting Observation) on the web....

2002-02-01 Thread Chas Owens
On Fri, 2002-02-01 at 10:44, Ron Goral wrote: > I have a very beginner's question. I've just been looking at the code for a > library file and noticed some, to me, very peculiar things. First, there is > text that is not commented, it is just typed in place. Why does this not > interfere with t

RE: Access Transmitted Data On "Server" Side Of A TCP Socket

2002-02-01 Thread Hewlett Pickens
Received an off-list reply that solved the problem. Replaced $client->recv with: $dataIn = <$client>); There's no way I would have figured that out on my own. Hew Hewlett M. Pickens BIM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

RE: change all files in directory

2002-02-01 Thread Hanson, Robert
Oh, you're on Windows, it may not work because of the shell ("cmd"). In Windows the single quotes around the code usually need to be double quotes, and it doesn't seem to be expanding *.cpp when on Unix (types) it will expand that to all of the individual file names. I guess you need to write a

simple commenting question ...

2002-02-01 Thread Pfeiffer, Richard
Can I comment an entire block of code with comments at just the beginning and end of the block instead of having to put a # at the beginning of each line? If so, what is the symbol? Thank You! -Richard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

why doesn't this error

2002-02-01 Thread Alex Harris
First, I read perldoc -f exec() and did as follows: exec "rsh $plant /u1/bin/forkit 'work.pl'" or print STDERR "Couldn't fork it.\n $!\n"; BUT, even though the file it should be exec - ing 'work.pl' does NOT exist on the remote system, the error doesn't get kicked off. The only error I'

RE: simple commenting question ...

2002-02-01 Thread ABhagwandin
Here is what you do =pod code block . =cut -Original Message- From: Pfeiffer, Richard [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 11:02 AM To: '[EMAIL PROTECTED]' Subject: simple commenting question ... Can I comment an entire block of code with comments a

RE: simple commenting question ...

2002-02-01 Thread Hanson, Robert
Yes. ...Sort of. =pod $x = 1; ... $y = 2; =cut The =pod and =cut are usually used for documentation but works for commenting out chunks of code as well. Currently there are no other mechanisms (unless you want to put it all in a if(0){} block :). Rob -Original Message- From: Pfeiffe

Re: PERL and XML Parser

2002-02-01 Thread P0R0NG
oh yes thanks for that! thanks. i overlooked that. my big... anyways, here's the correct xml version: Percy Alice in Chains The Pixies Percy and the Test Tube Babies Bob Marley Peter Tosh Percy Gone Jazz in using xml parser, how can i get the content

Writing to Multiple Files

2002-02-01 Thread Aaron White
Does anyone know the best way to write a really long form into two seperate flat files, which then can be polled using a generated ID# into HTML? Thanks Guys... -- /_/_/ Aaron K. White _/ _/ _/ _/ _/ GeSE Program Office _/_/_/ _/ _/ _/_/ _/ Web Developmen

Include file

2002-02-01 Thread gross, cedric
I have a set of program to do which is using always same var. So I would like to defined a small file where I defined my var (like $database="toto" $host="localhost" etc..) and then include it in my other program, but How to do that ? I try "use" but it's seems that is for complete module. "re

Re: why doesn't this error

2002-02-01 Thread Dave Benware
Alex Harris wrote: > > First, I read perldoc -f exec() and did as follows: > > exec "rsh $plant /u1/bin/forkit 'work.pl'" or >print STDERR "Couldn't fork it.\n $!\n"; > > BUT, even though the file it should be exec - ing 'work.pl' does NOT exist > on the remote system, the error doesn

RE: why doesn't this error

2002-02-01 Thread Bob Showalter
> -Original Message- > From: Alex Harris [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 11:06 AM > To: [EMAIL PROTECTED] > Subject: why doesn't this error > > > First, I read perldoc -f exec() and did as follows: > > exec "rsh $plant /u1/bin/forkit 'work.pl'" or >p

Get IP address from ifconfig

2002-02-01 Thread Chris Weyn
Richard, the bash shell script I used to do that was the following: /sbin/ifconfig eth0 |grep inet |cut -d ' ' -f12 | cut -d ':' -f2 This may not be generic, and you may have to fine-tune it to work for you, but it should give you the basic premise... Chris Weyn, Austin TX -- To unsubscrib

still not catching error

2002-02-01 Thread Alex Harris
I took out the exec and placed system. But even though work.pl doesn't exist on the remote system, still getting no error. Help! if (system("rsh $plant /u1/bin/forkit '/u1/bin/work.pl'") > 0) { excep(" $!\n"); } _

Win32::GUI - Getting rid of console Window?

2002-02-01 Thread Agustin Rivera
Is there anyway to get a Win3::GUI app to not display the DOS console when running, so it runs just like any other GUI app? Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: still not catching error

2002-02-01 Thread John Edwards
Try $result = `rsh $plant /u1/bin/forkit '/u1/bin/work.pl'`; print $result; You are storing the output of the rsh... command into the variable. You can now run a regex on that to check for success/failure. I don't know what the output should be but as an example... $result = `rsh $plant /u1/b

Re: Win32::GUI - Getting rid of console Window?

2002-02-01 Thread Morbus Iff
>Is there anyway to get a Win3::GUI app to not display the DOS console when >running, so it runs just like any other GUI app? Yuppers. use Win32::GUI; # hwnd is a handle to a window - basically, window's # way of keeping track of it's program windows... $hwnd = GUI::GetPerlWin

Perl DBI - using parameters

2002-02-01 Thread McElwee, Shane
Hi, This is my first effort at perl scripting so forgive my innocence. What I am trying to do is extract schema and data info from a proprietary database into flat files, format those files and import the data and schema into an Oracle database. The initial part of this is capturing the table n

Re: Get IP address from ifconfig

2002-02-01 Thread Richard Balfour
Hi Chris, Thanks for the tip. My script works like a charm now! Cheers, Richard On Fri, 1 Feb 2002, Chris Weyn wrote: > Richard, > > the bash shell script I used to do that was the following: > > /sbin/ifconfig eth0 |grep inet |cut -d ' ' -f12 | cut -d ':' -f2 > > This may not be generic, an

RE: PERL and XML Parser

2002-02-01 Thread Stout, Joel R
I not sure how more experienced Perl developers feel but in addition to XML::Parser, I found XML::SimpleObject a great way to start parsing XML. Here's a link: http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html Additionally, you can model the data anyway you want, but here's a little twis

Hash Question

2002-02-01 Thread Balint, Jess
Since this is a beginners list, I thought I would be allowed to ask this question. Can there be multiple values for hash keys, or just one? The reason I am asking is that I am working on a statistical program and would need to use multiple hashes as values of another hash. If this is possible, ple

Re: Perl DBI - using parameters

2002-02-01 Thread Michael Fowler
On Fri, Feb 01, 2002 at 12:13:41PM -0500, McElwee, Shane wrote: > foreach $i (@table_arr){ > $content = $i; > # print ("table name is: $i \n"); > open( CONTENT, ">$content" ) || die "Can't open file $content"; > my $sth = $dbh->prepare("select * from ?"); > $sth->bind_

RE: Hash Question

2002-02-01 Thread Hanson, Robert
Just one unless you use references. Here is an example with references... %hash = ( one => 1, two => 2 ); $hash{oneagain} = \$hash{one}; foreach my $key ( keys %hash ) { my $value = (ref $hash{$key}) ? ${$hash{$key}} : $hash{$key}; print "$key => $value\n"; } And when you

Re: Hash Question

2002-02-01 Thread Terry Dignon
Hashes cannot store multiple values (to the best of my knowledge), although they can store arrays or additional hashes which can of course, contain more values. "Balint, Jess" wrote > > Since this is a beginners list, I thought I would be allowed to ask this > question. Can there be multiple va

Re: Hash Question

2002-02-01 Thread Deen Hameed
Keys are unique in a hash; what you put in them is up to you. the new value will overwrite the old value, unless you append it during assignment, using the . operator. Yes, you can store a hash in a hash in a hash... :) try perldoc perldsc for stuff on data structures. deen On Fri, 1 Feb 200

RE: Hash Question

2002-02-01 Thread Hanson, Robert
The example I gave could also be expanded to include a subroutine to simplify getting a hash value... %hash = ( one => 1, two => 2 ); $hash{oneagain} = \$hash{one}; foreach my $key ( keys %hash ) { # Either will work, but I prefer the second print "$key => ".getVal(\%hash, $key).

soft reference

2002-02-01 Thread mb
Hi, I need help about soft referencing or extract value of array var. Can some one get a look to code bellow : Have a good week-end. asma. foreach(@articles) { ##($code,$article,$codeFamil,$uniteVent,$idDepot

Formats

2002-02-01 Thread ABhagwandin
Why does the following not work for me? format NAME = TEST @<<< $test .. $test = "asdfjkl;"; select(NAME); write(); __END__ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

FW: Formats

2002-02-01 Thread ABhagwandin
-Original Message- From: Anthony Bhagwandin Sent: Friday, February 01, 2002 1:11 PM To: [EMAIL PROTECTED] Subject: Formats Why does the following not work for me? format NAME = TEST @<<< $test $test = "asdfjkl;"; select(NAME); write(); __END__ -- To unsu

Re: Formats

2002-02-01 Thread Jeff 'japhy' Pinyan
On Feb 1, [EMAIL PROTECTED] said: >Why does the following not work for me? > >format NAME = >TEST > >@<<< >$test >.. > >$test = "asdfjkl;"; > >select(NAME); >write(); That tries writing to the filehandle NAME, too. Instead of select(NAME), do: $~ = "NAME"; That will set ST

Tr: soft reference

2002-02-01 Thread mb
-Message d'origine- De : mb <[EMAIL PROTECTED]> À : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : vendredi 1 février 2002 19:13 Objet : soft reference Hi, I need help about soft referencing or extract value of array var. Can some one get a look to code bellow : Have a good week-end. a

RE: Formats

2002-02-01 Thread ABhagwandin
thanks a lot! -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 1:19 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Formats On Feb 1, [EMAIL PROTECTED] said: >Why does the following not work for me? > >format NAME = >TE

Re: Hash Question

2002-02-01 Thread Chas Owens
On Fri, 2002-02-01 at 12:42, Balint, Jess wrote: > Since this is a beginners list, I thought I would be allowed to ask this > question. Can there be multiple values for hash keys, or just one? The > reason I am asking is that I am working on a statistical program and would > need to use multiple h

RE: Hash Question

2002-02-01 Thread Hanson, Robert
Better yet you could use 'tie' and create your own hash implementation like the code below. You will be able to set and retreive values normally except for the fact that if you want a single value to be linked to two keys you will need to store the value in one key and reference that key in anoth

directory file rename

2002-02-01 Thread Eric Plowe
I have a directory full of mp3s with various names, but I want to convert each mp3 to the file name 1.mp3 and continuing up to the last file in the directory - I would also like it to generate a text file that is setup like ->

Re: directory file rename

2002-02-01 Thread Jason Purdy
Hmmm ... seems pretty simple ... here's my baby-talk approach: # note: I would tar up your directory b4 running this program, just # in case it doesn't work (not in the mood to test this w/ my mp3's ;)) # backup backup backup! :) use File::Copy; # first, read in the dir/files opendir (DIR, "/pa

RE: Perl DBI - using parameters

2002-02-01 Thread McElwee, Shane
I misunderstood the example from the book. Thanks for clearing that up. @table_arr is reading from a file now but I can use your suggestion if I have to make the process more interactive. Thanks Shane -Original Message- From: Michael Fowler [mailto:[EMAIL PROTECTED]] Sent: Friday, Febru

Formats, cont'd

2002-02-01 Thread ABhagwandin
I have two arrays, @array_a and @array_b, that contain info I want formatted. I would like to have the output look something like: dataset A dataset B -- a1 b1 a2

Re: Include file

2002-02-01 Thread jeff loetel
You could use the module that I am trying to use but having problems: "AppConfig" or you could use this (it works but is to limited for what I need): #/usr/bin/perl my $file = "/dir/somefile.txt"; open (CONFIG, "< $file") or die "Can't open $file"; while () { chomp; #no

Tr: soft reference

2002-02-01 Thread mb
-Message d'origine- De : mb <[EMAIL PROTECTED]> À : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : vendredi 1 février 2002 19:01 Objet : soft reference Hi, I need help about soft referencing or extract value of array var. Can some one get a look to code bellow : Have a good week-end.

Tr: soft reference

2002-02-01 Thread mb
-Message d'origine- De : mb <[EMAIL PROTECTED]> À : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : vendredi 1 février 2002 19:01 Objet : soft reference Hi, I need help about soft referencing or extract value of array var. Can some one get a look to code bellow : Have a good week-end.

Tr: soft reference sorry I think that there is a pb of transmit

2002-02-01 Thread mb
Hi, I need help about soft referencing or extract value of array var. Can some one get a look to code bellow : Have a good week-end. asma. foreach(@articles) { ##($code,$article,$codeFamil,$uniteVent,$idDepot,$quantite) my @row1; push(@row1, $q -> td({align => 'center'},$article), ...

RE: change all files in directory

2002-02-01 Thread Brett W. McCoy
On Fri, 1 Feb 2002, Booher Timothy B 1stLt AFRL/MNAC wrote: > When I try to run the one-liners I get: > > Can't open *.cpp: Invalid argument. > Can't open *.hpp: Invalid argument. > > But when I do a dir command I get: > target_functions.cpptarget_modules.cpp global_constants.hpp > globa

Re: pulling file name into perl

2002-02-01 Thread Roger C Haslock
I don't think this is the right way to approach this. I suggest you look at opendir, readdir in perlfunc. opendir DIR, '/' or die "$0: no top level directory $!"; my @dirlist = readdir DIR; - Roger - - Original Message - From: "Russell Boyd" <[EMAIL PROTECTED]> To: ">" < <[EMAIL PROTECTE

RE: Formats, cont'd

2002-02-01 Thread Wagner-David
Maybe one of the guru's can help us, but here is one way: #!perl -w use strict; my @a1 = ();# leaving out $a1[1] so undefined and can use the check of undefined in loop $a1[0] = 1; $a1[2] = 3; $a1[3] = 4; $a1[4] = 5; $a1[5] = 6; my @b1 = (2,3,4,5,6,7); my $Mya1; my $Myb1; my $My

RE: Please point me to a language (perl I hope)

2002-02-01 Thread Camilo Gonzalez
Please stop making life difficult for yourself. If you need just a small part of a large image to animate, chop up the large image so the animated part can be isolated, place all the parts in a table to unite them and animate the needed part. As for the person walking, either use the above techn

help with script

2002-02-01 Thread Klein, Christopher
> can you review this script and see if you can spot any errors? > no errors appear in the log, but the lines in red do not process correctly > > see example 57 for the code that I got most of these problem spots from > > Chris > -Original Message- > From: Chris klein [mailto:[EMAIL PR

Wade through a file and grab titles

2002-02-01 Thread Booher Timothy B 1stLt AFRL/MNAC
I have a bunch of files in the form below and I want to go through the list and extract only the file name. The only way I can consistently see this is to take the next line after the ")." ahmad73 __ exist: 0 K. Ahmad and I. J. Smalley, Powder Technol. 8, 69 (1973). Observation of particle

Dates

2002-02-01 Thread Argenis Perez
this statement ($sec,$min,$hour,$mon,$year,$wday,$yday,$isdst) = localtime(); i obtain the date of today, but i need the $day,$mon,$year of yesterday How? Thank you Argenis Perez -- Nunca creas feliz a nadie que esté pendiente de la felicidad. Se apoya en una base frágil quien pone su alegría

Re: Hash Question

2002-02-01 Thread Dave Benware
"Balint, Jess" wrote: > > Since this is a beginners list, I thought I would be allowed to ask this > question. Can there be multiple values for hash keys, or just one? The > reason I am asking is that I am working on a statistical program and would > need to use multiple hashes as values of ano

RE: Please point me to a language (perl I hope)

2002-02-01 Thread Nikola Janceski
The rule of thumb for animated images: Flashing, blinking, rotating, jumpy-bumpy effects are distracting. If you must use animated images, keep it small, tasteful, and to a bare minimum. Studies have found that users have actually gone so far as to 'cover' annoying animations and blinking text wit

RE: Please point me to a language (perl I hope)

2002-02-01 Thread Brett W. McCoy
On Fri, 1 Feb 2002, Nikola Janceski wrote: > The rule of thumb for animated images: > Flashing, blinking, rotating, jumpy-bumpy effects are distracting. If you > must use animated images, keep it small, tasteful, and to a bare minimum. > Studies have found that users have actually gone so far as

RE: Dates

2002-02-01 Thread Nikola Janceski
use Date::Calc module; man Date::Calc (if it's installed). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:35 PM To: [EMAIL PROTECTED] Subject: Dates this statement ($sec,$min,$hour,$mon,$year,$wday,$yday,$isdst) = localtime(); i

RE: Hash Question

2002-02-01 Thread Balint, Jess
I think I will go ahead and use something like the multi-dimensional hash example below. What I need to do is create hashes dynamically based on how many are needed for this particular instance of the program. Any ideas on dynamic hash creation multi-dimensionally? Thanks -jess -Origina

Checking an existing instance of a process

2002-02-01 Thread Taylor, Dan
What is the most cautious way to see if I am already running an instance of a program and kill that said process? I'm setting up a shell that will be launched from a cronjob and want to make sure that if there was an instance of the same process running, that it was killed up front, before continu

RE: Dates

2002-02-01 Thread Timothy Johnson
Try this: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time -86400); #86400 seconds in a day print join "-",(($mon + 1),$mday,($year + 1900)); BTW, that's an interesting quote. If you don't mind my asking, who is Lucio Anneo Séneca? -Original Message- From: Argeni

RE: Hash Question

2002-02-01 Thread McCollum, Frank
Where might one find this 'tutorial'? -Original Message- From: Dave Benware [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:44 PM To: Beginners perl Subject: Re: Hash Question "Balint, Jess" wrote: > > Since this is a beginners list, I thought I would be allowed to ask t

RE: Win32::GUI - Getting rid of console Window?

2002-02-01 Thread Russ Foster
The only downside to this method is that an errant Perl Window can linger around long after you think it's been closed (i.e. it won't show anywhere expect under Task Manager). I prefer making a copy of perl.exe (in C:\Perl\bin) and call it something like perlw.exe. Then register perlw.exe as a Wi

RE: Hash Question

2002-02-01 Thread Chas Owens
how will you know how many keys are needed? On Fri, 2002-02-01 at 14:42, Balint, Jess wrote: > I think I will go ahead and use something like the multi-dimensional hash > example below. What I need to do is create hashes dynamically based on how > many are needed for this particular instance of t

RE: Win32::GUI - Getting rid of console Window?

2002-02-01 Thread Morbus Iff
>The only downside to this method is that an errant Perl Window can linger >around long after you think it's been closed (i.e. it won't show anywhere >expect under Task Manager). Russ, I had noticed that a while too. Somehow or another, with the Windows.pl file in the AmphetaDesk [1] source,

RE: Hash Question

2002-02-01 Thread Chas Owens
On Fri, 2002-02-01 at 15:23, Balint, Jess wrote: > A scalar value based on the number of command line arguments put into an > array. > > if( $ARGV[$_] =~ /^-f/ ) { > # PARSE TABULATION VALUES > if( $table ) { > $table = $ARGV[$_]; >

RE: Problem with format command

2002-02-01 Thread Michael Eggleton
Ok, Did I ask a dumb question? or is there just no answer? -Original Message- From: Michael Eggleton [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 8:33 PM To: [EMAIL PROTECTED] Subject: Problem with format command Hello All, Here is the code for the format command: use Wi

RE: Hash Question

2002-02-01 Thread Balint, Jess
The way I have the argument parsing set up is for ( 0..$#ARGV ) { . . . When a -f n is presented on the command line, n will be the field number for the first hash. So if I use -f 1 -f 2 -f 3, there will be three levels of hashes. The top level will contain all unique values in the first field of

generate variable names

2002-02-01 Thread mb
Hi all, I 'm asking if there a dynamic way to generate variable names. $id; foreach(@_){ my($var1 > in the second time my($var2 -> my($varn Thanks a lot in advance, asma

Re: generate variable names

2002-02-01 Thread Jeff 'japhy' Pinyan
On Feb 1, mb said: >I 'm asking if there a dynamic way to generate variable names. Yes, and you don't want it. >foreach(@_){ >my($var1 > in the second time my($var2 -> my($varn Why not use an array? my $i = 0; my @data; foreach (@_) { # work with $data[$i]

RE: generate variable names

2002-02-01 Thread Wagner-David
If you need something like that, you would be better off using a hash to hold the information vs a number of unknown variable names. I believe that this will be confirmed by the list helpers. Wags ;) -Original Message- From: mb [mailto:[EMAIL PROTECTED]] Sent: Friday, F

RE: still not catching error

2002-02-01 Thread Bob Showalter
> -Original Message- > From: Alex Harris [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 11:52 AM > To: [EMAIL PROTECTED] > Subject: still not catching error > > > I took out the exec and placed system. But even though > work.pl doesn't > exist on the remote system, still

Re: generate variable names

2002-02-01 Thread Brett W. McCoy
On Fri, 1 Feb 2002, mb wrote: > I 'm asking if there a dynamic way to generate variable names. There are easier ways that what you are thinking of. > $id; > foreach(@_){ > my($var1 > in the second time my($var2 -> my($varn > > Thanks a lot in advance, I'd just create an arr

RE: Wade through a file and grab titles

2002-02-01 Thread Bob Showalter
> -Original Message- > From: Booher Timothy B 1stLt AFRL/MNAC > [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 2:35 PM > To: [EMAIL PROTECTED] > Subject: Wade through a file and grab titles > > > I have a bunch of files in the form below and I want to go > through the li

RE: generate variable names

2002-02-01 Thread Bob Showalter
> -Original Message- > From: mb [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 4:37 PM > To: [EMAIL PROTECTED] > Subject: generate variable names > > > Hi all, > I 'm asking if there a dynamic way to generate variable names. Man, this question comes up a lot! :) -- To u

RE: Wade through a file and grab titles

2002-02-01 Thread Timothy Johnson
You can shorten this down using $_. while(my $line = ) { next if $line =~ /^\s*$/; if ($line =~ /\)\.\s*$/) { # attempt to match on .) at end of line $myTitle = <>; print LOGFILE $myTitle; } } can be written as: while() { if ($_ =~ /\)\.\s*$/) { # attempt to

RE: generate variable names

2002-02-01 Thread Russ Foster
> > I 'm asking if there a dynamic way to generate variable names. > Man, this question comes up a lot! :) I was thinking the same, maybe it should be put in the FAQ... -rjf -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

  1   2   >