Sponsored Content
Top Forums Programming My first PERL incarnation... Audio Oscillograph Post 303038172 by drl on Tuesday 27th of August 2019 11:41:45 AM
Old 08-27-2019
Hi.

Good to see people picking up perl. Although use has declined, I still find it very useful. The O'Reilly trilogy is quite useful, and I have found the PBP to be especially valuable. The tools I use the most are align and perltidy. We get many non-standard codes and libraries from The Comprehensive Perl Archive Network - www.cpan.org as well as The world’s leading software development platform . GitHub

Of the 1000+ scripts we have almost 300 are in perl:
Code:
       44 awk-[gmn]awk-native
( ... )
      280 perl
( ... )
      176 sh
     1182 total

For example, to trim things:
Code:
clenfi CLip ENds from FIle, n,m or --top=n --bottom=m; trim, omit.
pll    Print long-line, section, trim, shorten to width as necessary.
trim   Remove strings of whitespace at beginning and end of lines.

In looking at graphs, I get visually confused by too much ink. Going by Tufte https://www.amazon.com/Visual-Displa...dp/0961392142/ and Vellemanhttps://www.amazon.com/Applications-.../dp/087150409X I tend toward less is more, as below.

Keep up the good work ... cheers, drl

Code:
       +-------+-------+-------+---[DISPLAY]---+-------+-------+--------+       
       |*         *                 *  +       *     *                  | MAX   
       |   *          *  *       *     +*                       *   * * |       
       |         *                     +                                |       
       |       *    *             *    +                     **      *  |       
   +ve +       +       *  * *  +     * +       +  *    +       +        +       
       |             *        *        +              * *              *|       
       |        *                      +                           *    |       
       |           *            *      +                                |       
     0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*-**+-+-+-+-+-+-*-+-+-+-+-+-+--+ REF   
       |                     *         +     *         *   *            |       
       |                               +                         *      |       
       |      *                *   *  **  *               *             |       
    ve +  * *  +       +       +       +       +    *  +    *  +        +       
       |     *             *           +         *                      |       
       | *                             +      *                *        |       
       |                *              +        *  *              *     | MIN   
       +-------+-------+-----[AUDIO  OSCILLOGRAPH]-----+-------+--------+

Code:
Books:
Title: Learning Perl
Subtitle: Making Easy Things Easy & Hard Things Possible
Author: R Schwartz, T Phoenix
Edition: 4th
Date: July 14, 2005
Publisher: O'Reilly
ISBN: 0596101058
Pages: 304
Categories: perl, text manipulation, development, scripting, programming
Comments: I have 3rd, 2001
Comments: 4 stars (290 reviews, Amazon, 2007.12)

Title: Intermediate Perl
Subtitle: Beyond the Basics of Learning Perl
Author: R Schwartz, b d foy, T Phoenix
Edition: 2nd
Date: 2006
Publisher: O'Reilly
ISBN: 0596102062
Pages: 278
Categories: perl, text manipulation, development, scripting, programming
Comments: 2nd edition, but first was named "Learning Perl Objects ..."
Comments: 4.5 stars (9 reviews, Amazon, 2007.12)

Title: Mastering Perl
Subtitle: Creating Professional Programs with Perl
Author: b d foy
Edition: 1st
Date: July 16, 2007
Publisher: O'Reilly
ISBN: 0596527241
Pages: 342
Categories: perl, text manipulation, development, scripting, programming
Comments: 4.5 stars (5 reviews, Amazon, 2007.12)

Title: Perl Best Practices
Subtitle: Standards and Styles for Developing Maintainable Code
Author: Damian Conway
Date: 2005
Publisher: O'Reilly
ISBN: 0596001738
Pages: 500
Categories: perl, standard, development, scripting, programming
Comments: 4.5 stars (39 reviews, 2011.08) at Amazon.

Codes:
Code:
align   Align columns of text. (what)
Path    : ~/p/stm/common/scripts/align
Version : 1.7.0
Length  : 270 lines
Type    : Perl script, ASCII text executable
Shebang : #!/usr/bin/perl
Help    : probably available with --help
Home    : http://kinzler.com/me/align/ (doc)
Modules : (for perl codes)
 Getopt::Std    1.10

perltidy        a perl script indenter and reformatter (man)
Path    : /usr/bin/perltidy
Version : (local) 
Type    : HTML document, ASCII text ...)
Repo    : Debian 8.11 (jessie) 
Home    : http://perltidy.sourceforge.net/ (pm)
Modules : (for perl codes)
 Perl::Tidy     20140328
 Excel::Writer::XLSX::Package::Theme    0.24

These 3 Users Gave Thanks to drl For This Post:
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Audio HELP Please!

I know about next to nothing, and I am trying to play an audio file on HP-UX 10.2 (743i) every time I try to use the ‘/opt/audio/bin/AudioCP &' command I get an error message that says “Unable to access audio hardware.” I checked the man page on audio, and both Aserver and rpcd are running. Am I... (4 Replies)
Discussion started by: Matt
4 Replies

2. UNIX for Dummies Questions & Answers

playing audio

Hi all, I play audio through the web browser and it plays ok on windows. When i try the same thing on unix i get the error message "sh: /usr/local/bin/sox: not found. I've tried 'locate sox' and can't seem to find it. Is there some way I can change the browser settings so they play the audio... (3 Replies)
Discussion started by: molli_81
3 Replies

3. UNIX for Advanced & Expert Users

Audio-Text in Unix

Hello all, Could anyone help to me :as to how can i record an audio file in unix and convert it into a text . Or anything with audio recording to get started would help . thanks, (3 Replies)
Discussion started by: phantom308
3 Replies

4. UNIX for Dummies Questions & Answers

Audio Problem

Hi I recently installed BT 5 Gnome on my Asus laptop running on Intel HD graphics. I've been having problems with audio, at first I experienced the basic problem that was solved by adding pulse audio to the starting programs. This allowed me to open Sound preferences but I still have no sound.... (0 Replies)
Discussion started by: edreeso
0 Replies

5. Slackware

Problems with audio recording in Audacity 2.0.5. Slackware64 14.1; Intel HD Audio.

I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Discussion started by: qzxcvbnm
2 Replies

6. OS X (Apple)

An Audio Function Generator...

Ok guys, gals and geeks... As from today I am starting to learn awk in earnest doing something totally different. I am going to create a pseudo-Audio_Function Generator centred around OSX 10.11.x minimum. The code below is a tester to see what the possibilities are. All waveforms will be... (11 Replies)
Discussion started by: wisecracker
11 Replies
All times are GMT -4. The time now is 07:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy