searching a string

2003-03-18 Thread mark sony
Hi i am searching for a string of consecutive words say "the lucky coin" These may be in one line or different line separated by blank lines such as 1>the lucky coin 2>thelucky coin 3>the lucky coin Whats the way in perl ? mark ___

Re: Re: searching a string

2003-03-18 Thread mark sony
Hi It is giving the found status everytime even when there are no strings: My script: #!/usr/local/bin/perl -w #use strict; #use warnings; while () { $string = "the\n\tlucky\n\t\tcoins"; if ($string =~ m/^(\s)*the(\s)*lucky(\s)*coins(\s)*$/) { print "Yup,exists.\n"; } else { print "nope \n"; } }

Searching a string from a file

2003-03-18 Thread mark sony
Note: Forwarded message attached -- Orignal Message -- From: "mark sony" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Re: searching a string ___ Odomos - the only mosquito prot

searching for a string

2003-03-18 Thread mark sony
Hi I was trying the following code : open ( fh , "test1.txt"); while () { $string = "the lucky coin"; if ($string =~ m/(\b)the(\s)(\b)lucky(\s)(\b)coin(\b)$/) { print "Yup,exists.\n"; } else { print "nope \n"; } } But the results are not as expected. I was thinking of the following : search for "

simple query

2003-03-19 Thread mark sony
Hi Can anyone tell me what does $. in perl mean ? And also anyplace I will get references about these in quick time ie. a handbook type ? mark ___ Odomos - the only mosquito protection outside 4 walls - Click here to know more!

perl DBI

2003-03-25 Thread mark sony
Hi all What are the good online sites which will give details about perl DBI, about using perl interacting with databases,right from basic to advanced stage? mark ___ Odomos - the only mosquito protection outside 4 walls - Cli

html and perl

2003-06-02 Thread mark sony
Hi, I have a very basic question.I have one html(foo.html) page having one text field and two buttons(one is submit other is reset).I have saved it in one directory.There is a perl program (say foo.pl) which will accept the text (submitted when "submit" button is pressed),as argument and displa

Re: Running a .pl file in Windows opens a "File Download" window

2003-06-04 Thread mark sony
Hi, The simplest way would be to open a dos window and pass the perl executable with the prog. as argument. If Perl.exe is in C:\perl_local\bin and the program say foo.pl is saved in d:\examples\foo.pl then give this command C:\perl_local\bin\perl d:\examples\foo.pl The directories will vary

cgi problem

2003-06-11 Thread mark sony
Hi I have a basic question While using the ordinary guestbook pogram it is running fine but the moment I am trying to call a program in the cgi-bin directory it gives : The POST method is not valid for this URL What is the reason ? What is the way of accepting user input from html page and using

Multiline matching

2003-07-03 Thread mark sony
Hi all, I am writing a program which will print variety of matches having keywords like insert,delete etc from another file .For this I wrote a couple of sub routines one of which returns an array(having the comments removed ).Then I face the problem : A part of that array is : CURSOR c_efc(l_w

need help

2003-07-03 Thread mark sony
Hi all, I am writing a program which will print variety of matches having keywords like insert,delete etc from another file .For this I wrote a couple of sub routines one of which returns an array(having the comments removed ).Then I face the problem : A part of that array is : CURSOR c_efc(l_wor

look arounds

2003-07-06 Thread mark sony
Hi All, Can anyone plz explain to me why this one is not working : $_ = "The brown fox jumps over the lazy dog"; /the (\S+)(?{ $color = $^N }) (\S+)(?{ $animal = $^N })/i; print "color = $color, animal = $animal\n"; When I run the program it gives :color = , animal = I took it from this link

file updation

2003-08-25 Thread mark sony
Hi All I need some guidance on the following :- I have one file (say about 6000 lines) data divided into four columns,say filename,owner,version etc.Now there would be two more columns which shall be updated by multiple users according to the need .Whats the best possible way of going forward?

Re: Re: file updation

2003-08-25 Thread mark sony
Hi Thanx for the reply but now I cant use database for this program . I have to do with modifying files in some way or the other . Please give me some other pointers . Thanx Mark On Mon, 25 Aug 2003 zsdc wrote : mark sony wrote: I have one file (say about 6000 lines) data divided into four

create log as well as print on screen

2003-08-20 Thread mark sony
Hi All, I wrote a script which is running perfectly fine providing many outputs on the screen . Only glitch is that it does not print in a log file . Now what I want is that it would print on the screen as well as create a log file . At the end of the program I will output that the above o