Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Perl Socket Programming Examples

It's always a pleasure to run private courses - for when a questions that's a little bit away from the normal comes up, I can take time to provide a full answer and demonstration without fear of loosing delegates from other companies who have no interest. And so it was today - I have two examples, plus an old favourite.

Firstly, my customers told me that they'll be running a number of other programs / commands from within Perl, and wish to use Perl as the "puppeteer" - writing to and reading from those other processes even as they run. Choosing ping as an example program to run from within Perl, opened a demonstration process on a pipe and then read from that pipe. See Source code

Then, I was asked about (and got involved) in socket programming. The first example, with it all in a single program, got a little long ... so I refactored into a structured program, which makes it much easier to follow. See both the main program source code and the code of the subs that I used

Finally, they say "the old ones are the best", don't they? I so often write a demonstration to show context - how a list referred to in different ways can be output as all the elements jammed together, with the elements spaced out, or as just the number of elements in the list. Today's demonstration has its source code here on our site.
(written 2008-12-02, updated 2008-12-03)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
P224 - Perl - Intersystem Communications
  [604] Perl - multiprocess applications - (2006-02-13)
  [1073] Heartbeat script in Perl - (2007-02-09)
  [2402] Automated Browsing in Perl - (2009-09-11)
  [2695] TCP v UDP / Client v Server - Python examples - (2010-03-25)
  [2876] Different perl examples - some corners I rarely explore - (2010-07-18)
  [2970] Perl - doing several things at the same time - (2010-09-25)

P223 - Perl - Interprocess Communication
  [2694] Multiple processes (forking) in Python - (2010-03-25)
  [3010] Children, zombies, and reaping processes - (2010-10-23)
  [3011] What are .pid files? - (2010-10-23)
  [3412] Handling binary data in Perl is easy! - (2011-08-30)
  [3940] Run other processes from within your Perl program - (2012-12-03)

P208 - Perl - Lists
  [28] Perl for breakfast - (2004-08-25)
  [140] Comparison Chart for Perl programmers - list functions - (2004-12-04)
  [230] Course sizes - beware of marketing statistics - (2005-02-27)
  [240] Conventional restraints removed - (2005-03-09)
  [355] Context in Perl - (2005-06-22)
  [463] Splitting the difference - (2005-10-13)
  [560] The fencepost problem - (2006-01-10)
  [622] Queues and barrel rolls in Perl - (2006-02-24)
  [762] Huge data files - what happened earlier? - (2006-06-15)
  [773] Breaking bread - (2006-06-22)
  [928] C++ and Perl - why did they do it THAT way? - (2006-11-16)
  [968] Perl - a list or a hash? - (2006-12-06)
  [1304] Last elements in a Perl or Python list - (2007-08-16)
  [1316] Filtering and altering Perl lists with grep and map - (2007-08-23)
  [1703] Perl ... adding to a list - end, middle, start - (2008-07-09)
  [1828] Perl - map to process every member of a list (array) - (2008-10-09)
  [1917] Out of memory during array extend - Perl - (2008-12-02)
  [2067] Perl - lists do so much more than arrays - (2009-03-05)
  [2226] Revision / Summary of lists - Perl - (2009-06-10)
  [2295] The dog is not in trouble - (2009-07-17)
  [2484] Finding text and what surrounds it - contextual grep - (2009-10-30)
  [2813] Iterating over a Perl list and changing all items - (2010-06-15)
  [2833] Fresh Perl Teaching Examples - part 2 of 3 - (2010-06-27)
  [2996] Copying - duplicating data, or just adding a name? Perl and Python compared - (2010-10-12)
  [3400] $ is atomic and % and @ are molecular - Perl - (2011-08-20)
  [3548] Dark mornings, dog update, and Python and Lua courses before Christmas - (2011-12-10)
  [3669] Stepping through a list (or an array) in reverse order - (2012-03-23)
  [3870] Writing more maintainable Perl - naming fields from your data records - (2012-09-25)
  [3906] Taking the lead, not the dog, for a walk. - (2012-10-28)
  [3939] Lots of ways of doing the same thing in Perl - list iteration - (2012-12-03)
  [4609] Mapping an array / list without a loop - how to do it in Perl 6 - (2016-01-03)


Back to
Out of memory during array extend - Perl
Previous and next
or
Horse's mouth home
Forward to
Transition
Some other Articles
Flurinci knows Raby Lae PHP and Jeve
Romeo and Julie
Progress Bar Techniques - Perl
Transition
Perl Socket Programming Examples
Why I remember East Grafton
Quietly putting prices up
It must be nearly Christmas
Alastair Darling helps make paperwork and confusion
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1918_Per ... mples.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb