Re: find for a word in a file

2007-10-14 Thread yitzle
You will need to use the open keyword to open the file, the while loop to loop through the file and the RegEx matching patternt to search for the word. Documentation on all that exists at http://perldoc.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Controlling Firefox via Perl

2007-10-14 Thread Rob Dixon
Felix Mater wrote: I've seen a programm written in Java that, on demand, opens an url in a firefox window, or, if that already exists, opens the url in a new tab. Can this also be done from perl, is there a module that can control firefox? You don't need a Java program to do that - Firefox jus

Re: OT: Problem Distributing my Perl Program

2007-10-14 Thread Rob Dixon
Inventor wrote: Hi, this question may be a bit off-topic but I do not know where to ask and you've all been so helpful with my questions about the program itself. To distribute the program I zip up the Perl source file with some other text files by first using tar -cf filename.tar *, then gzip f

Re: why "cant execute " error ?

2007-10-14 Thread Paul Lalli
On Oct 14, 6:47 am, [EMAIL PROTECTED] (Pauld) wrote: > # now connect and get a database handle > my $dbh = DBI->connect($dsn, $user, $pass) or die "Cant connect to the > DB: $DBI::errstr\n"; > my $sql="SELECT value FROM res_prior"; > my $sth = $dbh->prepare($sql) or die "cant prepare"; > $sth->exec

Re: find for a word in a file

2007-10-14 Thread Chas. Owens
On 10/14/07, Vidhi <[EMAIL PROTECTED]> wrote: > hi > I am in a bad situation to finish my assignment.I am very new to perl, > started to explore to complete my assignment. > > I need to open a gdbm file and search for a word in it. > how can i write it. > plse help! take a look at perldoc -f dbmo

Re: Beginner Reg.Expression Question

2007-10-14 Thread Jenda Krynicky
From: "Dr.Ruud" <[EMAIL PROTECTED]> > "Jenda Krynicky" schreef: > > > Having a string like this: > > > > $version = 'Version: 1.47.785'; > > > > increment the last number. I seriously doubt you can do anything even > > remotely as simple as > > > > $version =~ s/^(Version:\s*(?:\d+\.)*)(\d+)/$1

Re: find for a word in a file

2007-10-14 Thread Tom Phoenix
On 10/14/07, Vidhi <[EMAIL PROTECTED]> wrote: > I need to open a gdbm file and search for a word in it. You can use the tie() function to connect a hash to the GDBM file, more or less like this: use GDBM_File; tie my %DATA, "GDBM_File", $filename, &GDBM_READER, 0; Then you can examine the h

Re: Controlling Firefox via Perl

2007-10-14 Thread yitzle
None of this is tested. Its just ideas. 1. You can execute the system command: system("$path_to_firefox . $url"); eg system("C:\Program Files\Firefox\firefox.exe http://www.gmail.com";); Or it might require: system("C:\Program Files\Firefox\firefox.exe" http://www.gmail.com); The point is, I think

find for a word in a file

2007-10-14 Thread Vidhi
hi I am in a bad situation to finish my assignment.I am very new to perl, started to explore to complete my assignment. I need to open a gdbm file and search for a word in it. how can i write it. plse help! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: problems install Net::SSH::Perl

2007-10-14 Thread mmccaws2
On Oct 13, 5:35 am, [EMAIL PROTECTED] wrote: > On Oct 13, 7:43 am, [EMAIL PROTECTED] (Mmccaws2) wrote: > > > Hi > > > I working with a fairly new install of HPUX with perl 5.8.x trying to > > load up Net::SSH::Perl. > > > The issues is that there is so many module dependancies that when it > > star

Re: why "cant execute " error ?

2007-10-14 Thread Gunnar Hjalmarsson
pauld wrote: # now connect and get a database handle my $dbh = DBI->connect($dsn, $user, $pass) or die "Cant connect to the DB: $DBI::errstr\n"; my $sql="SELECT value FROM res_prior"; my $sth = $dbh->prepare($sql) or die "cant prepare"; $sth->execute($sql) or die "cant execute"; $sth->execu

Controlling Firefox via Perl

2007-10-14 Thread Felix Mater
I've seen a programm written in Java that, on demand, opens an url in a firefox window, or, if that already exists, opens the url in a new tab. Can this also be done from perl, is there a module that can control firefox? TIA Felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

why "cant execute " error ?

2007-10-14 Thread pauld
# now connect and get a database handle my $dbh = DBI->connect($dsn, $user, $pass) or die "Cant connect to the DB: $DBI::errstr\n"; my $sql="SELECT value FROM res_prior"; my $sth = $dbh->prepare($sql) or die "cant prepare"; $sth->execute($sql) or die "cant execute"; and i get a "cant execute" erro

Re: OT: Problem Distributing my Perl Program

2007-10-14 Thread Tom Phoenix
On 10/13/07, Inventor <[EMAIL PROTECTED]> wrote: > Thanks for the reassurance that there *should* be no such > thing as a text file virus. Sure, there are text file viruses. Sorry to burst your bubble. There are lots of text-only viruses. Every powerful scripting system is vulnerable to viral co

Re: From a seriers of data (x,y) to bell curve (normal distribution)

2007-10-14 Thread Tom Phoenix
On 10/13/07, hany <[EMAIL PROTECTED]> wrote: > What I want is just like Figure 1: Histogram and the Normal > Distribution for PCC Compressive Strength Data in > http://training.ce.washington.edu/WSDOT/Modules/08_specifications_qa/normal_distribution.htm > (I don't know how I can post picture here.

Re: From a seriers of data (x,y) to bell curve (normal distribution)

2007-10-14 Thread hany
On Oct 13, 11:13 am, [EMAIL PROTECTED] (Tom Phoenix) wrote: > On 10/12/07, hany <[EMAIL PROTECTED]> wrote: > > > I have a series of data (x,y) as below. I want to use this data to > > create a bell curve (normal distribution) with perl. How can I do > > this? > > There are modules on CPAN for many

Re: OT: Problem Distributing my Perl Program

2007-10-14 Thread Inventor
On Oct 13, 12:06 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: > On 10/13/07, Inventor <[EMAIL PROTECTED]> wrote: > > > To distribute the program I zip up the Perl source file with > > some other text files by first using tar -cf filename.tar *, then gzip > > filename.tar, then renaming filename.tar.g

Re: OT: Problem Distributing my Perl Program

2007-10-14 Thread Inventor
On Oct 13, 12:06 pm, [EMAIL PROTECTED] (Chas. Owens) wrote: > > Both .tgz and .tar.gz are valid extensions for tarballs. So far as I > know, there is no such thing as a text file virus. There was a text > file that could crash WinNT 3. Are you certain that you have only put > text files in the t

Re: problems install Net::SSH::Perl

2007-10-14 Thread sisyphus359
On Oct 13, 7:43 am, [EMAIL PROTECTED] (Mmccaws2) wrote: > Hi > > I working with a fairly new install of HPUX with perl 5.8.x trying to > load up Net::SSH::Perl. > > The issues is that there is so many module dependancies that when it > starts uploading those dependancies, they just stream by. How