Hi
can you advise on the best way test if a usb modem is plugged in ?
I though about checking if the file/node /dev/ttyACM0 is present, as
it's created when the device is plugged in using open (TEST,
"/dev/tty/ACM0"); but just concecned if i do this while the device is
acitive it will cause it to
Hi
I have a script that i'm working on, I want it to write info to a log
file, but I can't get it to write to the file.. I run the script as
root, and I also chmod 0777 the file but still no out put ...
what have it missed ..
___script___
#!/usr/bin/perl
print "hello";
use
use strict;
#p
--- Ryan <[EMAIL PROTECTED]> wrote:
> What is a lexical file handle? I'm working my way
> through Ford's "Perl
> Programming for the Absolute Beginner" (2007) and
> Lee's "Beginning Perl"
> (2004), and they both use the FH style of file
> handle.
>From perl 5.6 you can say,
open my $fh,"te
On 7/19/07, Ryan <[EMAIL PROTECTED]> wrote:
What is a lexical file handle? I'm working my way through Ford's "Perl
Programming for the Absolute Beginner" (2007) and Lee's "Beginning Perl"
(2004), and they both use the FH style of file handle. Should I do
differently?
snip
Yes, you should use
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> Peter Scott wrote:
> > On Wed, 18 Jul 2007 17:49:52 +, Monty wrote:
> >> Disregarding any limitations of this code, do I
> understand that
> >> accept() spawns another socket with the file
> handle of SESSION?
> >
> > If you're studying things
What is a lexical file handle? I'm working my way through Ford's "Perl
Programming for the Absolute Beginner" (2007) and Lee's "Beginning Perl"
(2004), and they both use the FH style of file handle. Should I do
differently?
Thanks.
--Chris
Chas Owens wrote:
On 7/19/07, [EMAIL PROTECTED] <
That's the book I got the code snippet from. I hadn't found (yet) the
explanation I'm looking for, but some testing has shown me that's
what's happening.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 7/19/07, John W. Krahn <[EMAIL PROTECTED]> wrote:
Chas Owens wrote:
> On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
>> >
>> > when I use while($line1 = ){
>> >$line = ;
>> > }
>>
>
Chas Owens wrote:
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
>
> when I use while($line1 = ){
>$line = ;
> }
while ($line=)
{
print"$line";
}
2. while ($line =
On Jul 18, 6:49 pm, [EMAIL PROTECTED] (Monty) wrote:
> In studying network programming (and I'm just beginning at it), I see
> where listen() is called to set up a socket that waits for incoming
> connection requests. The next step appears to be a call to accept()
> where the request is granted an
Peter Scott wrote:
On Wed, 18 Jul 2007 17:49:52 +, Monty wrote:
Disregarding any limitations of this code, do I understand that
accept() spawns another socket with the file handle of SESSION?
If you're studying things at this low level for academic purposes, I
recommend Lincoln Stein's "Ne
On 7/19/07, CM Analyst <[EMAIL PROTECTED]> wrote:
Ok, I will sound like an idiot and at the moment, I
feel like...
Previously I was able to install and use the
Win32:SerialPort module in my script on a WinXP PC.
My requirement is now to run script on a Windows 2000
Workstation, so I downloaded
You can use substr() to get the string starting at 16 and going to
26... (did I count right?)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 7/19/07, jeanwelly <[EMAIL PROTECTED]> wrote:
$my_string = "a\nbbl.dghd\n/usr/command\n";
I want to distill /usr/command and assign to a variable, how can I do?
thanks!
The smart ass in me wants to say
my $my_string = "a\nbbl.dghd\n/usr/command\n";
my $substring = "/usr/command";
> -Original Message-
> From: jeanwelly [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 19, 2007 05:26
> To: beginners@perl.org
> Subject: Distill some string from whole string
>
> $my_string = "a\nbbl.dghd\n/usr/command\n";
>
> I want to distill /usr/command and assign to a variable
$my_string = "a\nbbl.dghd\n/usr/command\n";
I want to distill /usr/command and assign to a variable, how can I do?
thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Ok, I will sound like an idiot and at the moment, I
feel like...
Previously I was able to install and use the
Win32:SerialPort module in my script on a WinXP PC.
My requirement is now to run script on a Windows 2000
Workstation, so I downloaded and installed Perl 5 and
the said module using "ppm
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
> Hi all
>
> I got started on Perl only today!
> I have a text file in which I need to read a line and the line after
> that. Like
>
> line1 and line2
> line2 and line3
> line3 and line4
On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
How do I write a multiple file perl program? I dont want to conflict
with any real module names that were built in or are on CPAN. I just
want to spread some subs onto some other files.
The easiest way to avoid namespace conflict is to i
How do I write a multiple file perl program? I dont want to conflict
with any real module names that were built in or are on CPAN. I just
want to spread some subs onto some other files.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.
On Jul 18, 6:16 am, [EMAIL PROTECTED] (Ayesha) wrote:
> Hi all
>
> I got started on Perl only today!
> I have a text file in which I need to read a line and the line after
> that. Like
>
> line1 and line2
> line2 and line3
> line3 and line4
>
> when I use while($line1 = ){
>
John W. Krahn wrote:
kapil.V wrote:
Hi,
Hello,
su-2.05b# df -h .
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1e 136G 102G 23G 82% /home
From my script I do:
my $du = qx#df -h \.#;
($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)?)[ M|G]/sg;
On 7/19/07, Amichai Teumim <[EMAIL PROTECTED]> wrote:
Hi
This is my homework:
This really isn't a forum for people's homework.
"Write a script called *obj13-1.pl* and a library called *obj13-lib.pl*. The
library should contain a function that takes in an array of numbers (of
arbitrary size)
Hi
This is my homework:
"Write a script called *obj13-1.pl* and a library called *obj13-lib.pl*. The
library should contain a function that takes in an array of numbers (of
arbitrary size). The function will then calculate the average of the
numbers, the total of all of the numbers added togethe
[EMAIL PROTECTED] wrote:
lnatz wrote:
Hi, I'm having an issue with here docs, and I'm sure it's something
simple that I'm overlooking but it's annoying me. Here is a snippet
from my script.
sub usageAndDie {
print< < EOF;
>> The following single-character otions are accepted:
>> wih argument
--- Peter Scott <[EMAIL PROTECTED]> wrote:
> On Wed, 18 Jul 2007 17:49:52 +, Monty wrote:
> > Disregarding any limitations of this code, do I
> understand that
> > accept() spawns another socket with the file
> handle of SESSION?
>
> If you're studying things at this low level for
> academic
I think that Rob was onto something, here
is my 2 cents.
The print line should be like this:
print <
and not
print< < EOF
like you have. I think maybe that what is
happening is that the error that is being printed is saying that it cannot find
“EOF” before end of file
On Wed, 18 Jul 2007 17:49:52 +, Monty wrote:
> Disregarding any limitations of this code, do I understand that
> accept() spawns another socket with the file handle of SESSION?
If you're studying things at this low level for academic purposes, I
recommend Lincoln Stein's "Network Programming W
On Jul 18, 6:43 am, [EMAIL PROTECTED] (kapil.V) wrote:
> su-2.05b# df -h .
> Filesystem Size Used Avail Capacity Mounted on
> /dev/ad0s1e 136G 102G 23G 82% /home
>
> From my script I do:
> my $du = qx#df -h \.#;
> ($total,$used) = $du =~ /([0-9]+(\.[ 0-9]+)
Thanks very much. It runs a LOT faster now.
Like 20 times or maybe even a bit more.
I'm now trying to verify that the result is still the same,
but I believe so.
So, thanks very much :)
JeeBee.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http
On Jul 18, 1:20 am, [EMAIL PROTECTED] (Jack Minoshima) wrote:
> Hi.
> Please allow me to ask another silly question.
>
> I wrote the program and it works fine.
>
>
> Animal.pm
> package Animal;
> use Exporter;
> @ISA = qw(Exporter
>>
>> my $exp = "nan|-?inf|[0-9\.e\+\-]+";
>> my $stat_pat =
>>"(?:\\s+($exp))(?:\\s+($exp))" . # $1 number of samples, $2 minimum
>>"(?:\\s+($exp))(?:\\s+($exp))" . # $3 maximum, $4 sum
>>"(?:\\s+($exp))(?:\\s+($exp))" . # $5 average, $6 variance
>>"(?:\\s+($exp))(?:\\s+($exp))";
El Jul 19, 2007, a las 12:19 AM, Joseph L. Casale escribió:
Interesting,
I see from your regexp you use a \A and \z, from Perldoc this means:
\A Match only at beginning of string
\z Match only at end of string
I am not sure I understand this requirement?
^ and $ depend on flags, and
33 matches
Mail list logo