RE: formatting numbers

2002-04-28 Thread Timothy Johnson
I can't test these, but I think they will work. Play around with sprintf a little bit. Don't forget to check out 'perldoc -f sprintf'. 383.3as 383.30 $var = sprintf("%3.2f",$var) 37492908 as 37 492 908 if($var 1 =~ /(\d{2})(\d{3})(\d{3})/){ $formattedvar = "$1 $

formatting numbers

2002-04-28 Thread pat
I have been through man printf, info printf and perldoc -f print and still can't find how to format numbers. In the program below I would like to print the numbers as below: 383.3as 383.30 37492908 as 37 492 908 35.7560234069824 as 35.76 1631.11929000261 as 1 63

Concatenating , the final time

2002-04-28 Thread james poni
Hello again (final time) I also want to sort the (number time) field when we have the same day eg: below: ccc gamma sun 3:00 aaa aplha mon 1:00 <1,12:30=>2,13:00=>3,13:30=>4 ..) ? THIS THE PROGRAM $line1 = "aaa alpha\nbbb beta\nccc gamma\nddd delta\neee epsilon\nzzz zeta\n ita\n

Re: unix redhat 7.2

2002-04-28 Thread aman cgiperl
Hi I don't say that apache is required - use any webserver, or s/w (sorry I do not know one), that supports cgi. And if that's not what you want to do, I wonder what are your writing cgi scripts for!!! Do let us know if it's ok. Also, you do not neccesary have to be "online" to use a webserver, yo

Re: unix -sed

2002-04-28 Thread drieux
On Sunday, April 28, 2002, at 05:41 , Michael Turner wrote: >> What is wrong? Isn't any command from vi able to be done in sed, just >> take >> out the leading :1,$ ? > > > That is not my understanding. Regex syntax was different in the many > different tools. volks should never confuse the

Re: I can't get this to run!

2002-04-28 Thread Peter Scott
At 05:20 PM 4/27/2002 -0700, drieux wrote: >>That's because the shebang line is ignored when you prefix the script with >>the perl command. > >you are correct - but I prefer to assert it the other way around, > >when the perl interpretor is invoked with a file - it reads and >executes the perl way

Re: unix -sed

2002-04-28 Thread Michael Turner
> What is wrong? Isn't any command from vi able to be done in sed, just > take > out the leading :1,$ ? That is not my understanding. Regex syntax was different in the many different tools. /Michael Turner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: Concatenating Again

2002-04-28 Thread John W. Krahn
James Poni wrote: > > Hello again > > I slightly changed the input but icant seem to get the output like this > below: > bbb beta sun 1,1 > aaa aplha mon 2,2 > ddd delta tue 3,3 > ccc gamma wed 4,4 > > How would i modify this program in order to do so ? > > THIS I THE PROGRAM use warnings; us

Re: authentication and user management

2002-04-28 Thread bob ackerman
On Sunday, April 28, 2002, at 06:15 AM, Mat Harrison wrote: > sorry to have to go back to this but I have found that if i try to fetch > a > cookie that isn't there, it doesn't return empty, it gives me a 500 error > and something like this. > > Can't call method "value" on an undefined value

Re: unix -sed

2002-04-28 Thread Michael Kelly
On 4/28/02 8:41 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... > In vi I could say :1,$g/^...$/s/\(.*\)/???\1/g# and it > works. > In Unix when I output to sed file | sed 's\(.*\)/???\1/g' ## > it works. > When I dofile | sed 'g/^...$/s/\(.*\)/???\1/

Send email with attachment

2002-04-28 Thread Ahmed Moustafa
Hi All, Would you post an example of sending an email with attachment(s) using Net::SMTP, please? Thanks in advance. Ahmed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: 3 field hash, value lookup by key is 2nd field

2002-04-28 Thread bob ackerman
On Friday, April 26, 2002, at 11:27 PM, r wrote: > Goal- look up value in a hash of 3 fields where middle is key field for > lookup. The build hash from text file part below is working fine. > Then I read in a transaction file with field $sicode which should > lookup/chain/match to the key ($si

3 field hash, value lookup by key is 2nd field

2002-04-28 Thread r
Goal- look up value in a hash of 3 fields where middle is key field for lookup. The build hash from text file part below is working fine. Then I read in a transaction file with field $sicode which should lookup/chain/match to the key ($sig)in the hash and find a weight (3rd field in hash, $wgt), a

unix - sed

2002-04-28 Thread Murzc
No flame war needed :>. It works. Thanks ciao drieux. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

unix -sed

2002-04-28 Thread Murzc
I have a file with phone numbers, one after another. I want to output this file to a sed command, that will check if there is 7 digits, and if there is, then add 3 leading question marks. This is structured that I need to use sed, not PERL or vi. In vi I could say :1,$g/^...$/s/\(.*\)/???

Re: regex

2002-04-28 Thread drieux
On Sunday, April 28, 2002, at 07:13 , Mat Harrison wrote: > what sort of regex's should i be looking at to validate a username and > password field so that input can only be up to and including 15 chars long > and does not contain any special characters? you want to limit usernames and passwd's

Concatenating Again

2002-04-28 Thread james poni
Hello again I slightly changed the input but icant seem to get the output like this below: bbb beta sun 1,1 aaa aplha mon 2,2 ddd delta tue 3,3 ccc gamma wed 4,4 How would i modify this program in order to do so ? THIS I THE PROGRAM $line1 = "aaa alpha\nbbb beta\nccc gamma\nddd delta\n"; $lin

regex

2002-04-28 Thread Mat Harrison
what sort of regex's should i be looking at to validate a username and password field so that input can only be up to and including 15 chars long and does not contain any special characters? -- Matthew Harrison Webmaster www.genestate.com [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PRO