Sorry, I've got the answer.
It should be
$mytty = POSIX::ttyname(1);
2008/10/28 Yue Chen <[EMAIL PROTECTED]>:
> Hi
>
> I am writing a perl script which need send current tty to another program.
>
> Now i am using external cmd 'tty' and redirect the result to my
> variable, such as:
>
> $mytty =
Hi
I am writing a perl script which need send current tty to another program.
Now i am using external cmd 'tty' and redirect the result to my
variable, such as:
$mytty = `tty`;
Since sometimes 'tty' is not in my PATH, my script is not always
successful. So is there a better perl internal mecha
Jenda Krynicky wrote:
From: "Chas. Owens" <[EMAIL PROTECTED]>
On Oct 24, 2008, at 11:00, "Sharan Basappa" <[EMAIL PROTECTED]>
wrote:
I was just trying to match a string and save it in a single statement
as follows:
$extracted = "cp xyz";
$state_var = $extracted =~ m/cp\s+(.*)/;
print "$state
On Mon, Oct 27, 2008 at 20:28, Rob Dixon <[EMAIL PROTECTED]> wrote:
> John W. Krahn wrote:
>>
>> The fewer lines of code to read and/or write, the easier it is to spot
>> mistakes, the less chance for "action at a distance."
>
> Not at all.
>
> Is this
>
> sub wanted { return unless -f; open my $FH
Adams Paul wrote:
> Hello everyone,
> I have a program which navigates to a page and then extracts the links and
> navigates
> to each of those links.It works fine for the first web page(the program
> navigates to
> the first page and then extracts the links and visits all the links).When I
> th
John W. Krahn wrote:
>
> The fewer lines of code to read and/or write, the easier it is to spot
> mistakes, the less chance for "action at a distance."
Not at all.
Is this
sub wanted { return unless -f; open my $FH, '<', $_ or die "Cannot open '$_'
$!"; while ( <$FH> ) { /\Q$string/ && print $
Hello everyone,
I have a program which navigates to a page and then extracts the links and
navigates
to each of those links.It works fine for the first web page(the program
navigates to
the first page and then extracts the links and visits all the links).When I
then try to get
the program to na
From: "Chas. Owens" <[EMAIL PROTECTED]>
> On Oct 24, 2008, at 11:00, "Sharan Basappa" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > I was just trying to match a string and save it in a single statement
> > as follows:
> >
> > $extracted = "cp xyz";
> > $state_var = $extracted =~ m/cp\s+(.*)/;
>
Jay Savage wrote:
On Mon, Oct 27, 2008 at 7:32 AM, Brian <[EMAIL PROTECTED]> wrote:
Hello again
Not too sure how to pose this question, but here goes.
Working on an html page.
There are many blocks of code placed between and in the page.
The block(s) I am playing with have seven lines of co
On Mon, Oct 27, 2008 at 7:32 AM, Brian <[EMAIL PROTECTED]> wrote:
> Hello again
>
> Not too sure how to pose this question, but here goes.
>
> Working on an html page.
> There are many blocks of code placed between and in the page.
>
> The block(s) I am playing with have seven lines of code place
"the basic intent is to provide visual clues"
Well, this is a limited approach, generated exactly by the fact that some
programmers don't really care about all those who read, but care the most
about their own preferences.
I am blind and the visual clues don't mean anything, but make the thin
Brian wrote:
Mr. Shawn H. Corey wrote:
This code is written this way because the coder has been playing too
much Perl Golf ;) The objective of Perl Golf is to write a program to
do a simple task in the least number of characters possible. This, of
course, makes it harder to read.
I must adm
Mr. Shawn H. Corey wrote:
On Mon, 2008-10-27 at 17:05 +, Brian wrote:
Hello
This code is written this way because the coder has been playing too
much Perl Golf ;) The objective of Perl Golf is to write a program to
do a simple task in the least number of characters possible. This, of
Bob McConnell wrote:
From: Brian
Why is it "good practice" to write PERL the way it is done?
Discussing coding styles often degenerates into a religious and/or
political argument, but I will try an overview.
Don't worry, I'll be gentle.
If you care to notice, even the prose above has a c
Mr. Shawn H. Corey wrote:
On Mon, 2008-10-27 at 17:05 +, Brian wrote:
Why is it that some code has no curly braces after print; whilst in
others I sometimes see one or more curly braces after it?
Will there be a time when print; will fail because there isn't a curly
brace following it, ev
On Mon, 2008-10-27 at 17:05 +, Brian wrote:
> Hello
>
> Years ago I used to work with FORTRAN, RPG GAP 2 and a smidgeon of basic.
> Code was written one line at a time, the first section of code was Input
> data, the next section was calculations, the last section was output.
> (For example,
From: Brian
>
> Why is it "good practice" to write PERL the way it is done?
>
Discussing coding styles often degenerates into a religious and/or
political argument, but I will try an overview.
The purpose for arranging code in various styles is to assist the next
programmer on the project. Whil
Telemachus wrote:
On Mon Oct 27 2008 @ 5:05, Brian wrote:
An example of something confusing me is in the sample below
find sub {
return unless -f;
open my $FH, '<', $_ or die "Cannot open '$_' $!";
while ( <$FH> ) {
/\Q$string/ && print $REPORT "$File::Find::name\n"
John W. Krahn wrote:
Brian wrote:
Hello
Hello,
An example of something confusing me is in the sample below
find sub {
return unless -f;
open my $FH, '<', $_ or die "Cannot open '$_' $!";
while ( <$FH> ) {
/\Q$string/ && print $REPORT "$File::Find::name\n" and
On Mon Oct 27 2008 @ 5:05, Brian wrote:
> An example of something confusing me is in the sample below
> find sub {
> return unless -f;
> open my $FH, '<', $_ or die "Cannot open '$_' $!";
> while ( <$FH> ) {
> /\Q$string/ && print $REPORT "$File::Find::name\n" and
> re
Brian wrote:
Hello
Hello,
Years ago I used to work with FORTRAN, RPG GAP 2 and a smidgeon of basic.
Code was written one line at a time, the first section of code was Input
data, the next section was calculations, the last section was output.
(For example, in the sample of code below, the "w
Hello
Years ago I used to work with FORTRAN, RPG GAP 2 and a smidgeon of basic.
Code was written one line at a time, the first section of code was Input
data, the next section was calculations, the last section was output.
(For example, in the sample of code below, the "while" line would have
b
Hello again
Not too sure how to pose this question, but here goes.
Working on an html page.
There are many blocks of code placed between and in the page.
The block(s) I am playing with have seven lines of code placed between
and , (repeated a number of times throughout the page) but
which
Hi all,
The problem was with the text file. I have solved it. Now pl. don't work for
this mail.
Thanks
Sanket Vaidya
_
Hi all,
I want to send mail using mime::lite to email addresses in text file (say
list.txt). Say the ids are [EMAIL PROTECTED], [EMAIL PROTECTED] & so on.
Hi all,
I want to send mail using mime::lite to email addresses in text file (say
list.txt). Say the ids are [EMAIL PROTECTED], [EMAIL PROTECTED] & so on. My
code is
use MIME::Lite;
my $user = 'myname';
my $pass = password';
open FH,'D:\perlprogs\list.txt';
@array = ;
MIME
Thank you John, your help has been very much appreciated.
Statistics for anyone interested.
AMD Athlon XP 2000 1.67GHz
1.25 GB RAM DDR
run time 11:32:23
(folder properties)
Size 2.38 GB (2,562,436,341 bytes)
Size on disc 9.83 GB (10,565,791,744 bytes)
2,574,662 files, 11 folders
Not sure what
26 matches
Mail list logo