Device::SerialPort Am I Missing Something?

2017-11-03 Thread Martin McCormick
$port->are_match("8");# possible end strings The $c string should then contain characters except for the number 8 which would be the end of that string. I have tried it with and without an are_match pattern and it just roars along, looping endlessly at the lookfo

Problems Receiving this List

2017-11-03 Thread Martin McCormick
read any answers there but this has been a strange issue as I never really found out why the list stopped. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Problems Receiving this List

2017-11-04 Thread Martin McCormick
rom me since 2015, that coincides with the year I retired from work and I haven't needed to post until recently. Many thanks. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Device::SerialPort Am I Missing Something?

2017-11-04 Thread Martin McCormick
. I put the digit '8' in the are_match expression and now, when I run the perl application, I see 0 1 2 3 4 5 6 7 so it is breaking the string on 8 which is precisely what I need for the test to work. Now I can go on and do something useful. I was being dense,

Warnings::Unused Linux perl

2017-11-05 Thread Martin McCormick
/usr/local/lib/site_perl .) at ./232start line 3. Thank you. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Warnings::Unused Linux perl

2017-11-05 Thread Martin McCormick
Shlomi Fish writes: > Hi Martin, > > please see https://metacpan.org/release/warnings-unused as well as > http://perl-begin.org/topics/cpan/wrappers-for-distributions/ and > http://perl-begin.org/topics/cpan/ . It should not be hard to install and > your > Linux distro may already have it packag

Re: Warnings::Unused Linux perl

2017-11-06 Thread Martin McCormick
Shlomi Fish writes: > Hi, > > The problem may have been the https://en.wikipedia.org/wiki/Letter_case . > That > module has no uppercase letters. That is exactly what it was. This was as easy as falling off the proverbial log cpanp -i warnings::unused all in lower case immediately found the

Re: Warnings::Unused Linux perl

2017-11-06 Thread Martin McCormick
Shlomi Fish writes: > Hi Martin, > > please see https://metacpan.org/release/warnings-unused as well as > http://perl-begin.org/topics/cpan/wrappers-for-distributions/ and > http://perl-begin.org/topics/cpan/ . It should not be hard to install and > your > Linux distro may already have it packag

Using Pack and Unpack

2017-12-06 Thread Martin McCormick
n running perl -d to view the contents of the string to make sure it is what it should be? Thank you. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Using Pack and Unpack

2017-12-07 Thread Martin McCormick
y with integrated circuits that have years of development baked in. If you understand what the IC's do, you can really make something to be proud of and be pretty sure that it will not give you any nasty surprises when operating conditions change. Again, thanks to all. Martin McCormick W

Removing a Pattern using a Regular Expression

2018-06-13 Thread Martin McCormick
ave that title. Any constructive ideas are appreciated. Thank you. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: How to compare timestamp in two different files(regex)

2018-10-24 Thread Martin McCormick
Someone brought to my attention that I had failed to define a couple of variables in the sample code I posted and they were quite right. I don't mind sharing my work but the entire application I wrote to get a brief local weather summary is 242 lines and I was trying to stay close to the topic, he

use Time::Piece

2018-10-30 Thread Martin McCormick
has a few more lines and the data dumper is commented out but it demonstrates what is happening. If there is some way to see what Time::Piece thinks I am trying to tell it to do then one might be able to figure out what is wrong but a miss is the same as close so I can't tell if I am g

Re: use Time::Piece

2018-10-31 Thread Martin McCormick
("$obtime[1], %d %b %Y %H:%M:%S %z"); Still the parse error. Right now, I do have both use Time::Local; use Time::Piece; in the program and Time::Piece is supposed to replace many of the functions of Time::Local. If I comment out Time::Local, a reference to gntime breaks.

Re: use Time::Piece

2018-11-01 Thread Martin McCormick
g arguments you saw. I figured the %D issue out but, by that time, I had messed around with things long enough that I forgot the , which separates the two arguments to that method must not be part of the quoted string so even when the %variables were right, the call would never work the way I had it.

Re: use Time::Piece

2018-11-01 Thread Martin McCormick
Jim Gibson writes: > On Oct 31, 2018, at 1:29 PM, Martin McCormick > wrote: > > my $t1 = Time::Piece->strptime("$obtime[1], %d %b %Y %H:%M:%S %z”); > > strptime is a method with two arguments: string to be parsed, format to > be used for parsing. You have

Device::SerialPort on debian Buster

2019-07-10 Thread Martin McCormick
Before I take this too far, I want to make sure I am not doing something wrong with use of the Device::SerialPort module in perl. The code below talks to what it thinks is a RS-232 serial port and controlls a radio scanner so that one can program the scanner's settings and enter fr

A Regular Expression Problem in Perl 5.28

2023-03-28 Thread Martin McCormick
=~ $regextest) {print "yes\n"; } I got a yes that time but that's not good enough. I'll probably kick myself when I find out what I am missing, but I can't seem to get this to work. Thank you. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: A Regular Expression Problem in Perl 5.28

2023-03-28 Thread Martin McCormick
Uri Guttman writes: > why are you escaping the {}?? those are meta chars that are needed to make > that a 5+ range. just delete the backslashes on them and it will work. First, thank you but read on, please. I couldn't agree more. That should do it but when I don't escape them, I

Re: A Regular Expression Problem in Perl 5.28

2023-03-28 Thread Martin McCormick
Uri Guttman writes: > you also quoted the whole regex in '' but included the // which are the > normal regex delimiters. remove the outer quotes. > and use the qr// form for regexes. > and you don't want the + after the \d as the {5,} is the count. you can't > have both types of repeat counts. > m

Re: A Regular Expression Problem in Perl 5.28

2023-03-28 Thread Martin McCormick
Uri Guttman writes: > yes, but he kept the {5,} repeat count. so i just kept it too. Now that I know how this works, I will probably change to {4,} as this would match 4 or more digits. From reading the documentation, {4} means 4 and only 4. {4,6} means 4 but nothing else except 6. {N,}

Are there any ALSA Perl Modules?

2024-01-28 Thread Martin McCormick
gic and bitwise operators plus a much more easy-to-use string handling capability which is why I am asking this question. I may be looking in the wrong places but, so far, I seem to be batting zeros when looking for perl and alsa together. Any good ideas are greatly appreciated, here.

Re: Are there any ALSA Perl Modules?

2024-01-29 Thread Martin McCormick
Shlomi Fish writes: > hi Martin, > you can try using an FFI, eg: > > https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod > > https://metacpan.org/dist/Inline-Python/view/Python.pod > > https://metacpan.org/pod/FFI::Platypus Many thanks. I am glad I asked the question but it has taken me

Upgrade from Debian 11 to Debian 12 Broke Perl.

2024-03-11 Thread Martin McCormick
cought up with me or I am missing something about the upgrade process that only broke perl as far as I know. Thanks for any constructive ideas for getting perl back. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Easiest Way in Perl to check Whether a Disk is Mounted

2024-06-01 Thread Martin McCormick
is since system calls are not as elegant? Thank you. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Linux Directory Copy Modules that Won't

2025-02-01 Thread Martin McCormick
ecause there has not been one bit copied using either of the two modules I tried and the dircopy module does exactly what one needs in this particular case but silently fails 100% of the time. Thanks for any good ideas since this appears to be quite useful but hasn't shown that side of it

Re: Linux Directory Copy Modules that Won't

2025-02-01 Thread Martin McCormick
Many thanks to all 3 who replied. You've given me more things to try. For one brief shining moment, I thought the very first suggestion had fixed the problem but I neglected to put the "or die!;" clause at the end of the line and it's still the same silent failure. For now, I will use t

Turning Perl Code in to C++

2025-05-07 Thread Martin McCormick
that reads the sound and stores it in files. Many thanks. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/