Skip directly to content

Software Engineering

imammal's picture
on Wed, 09/19/2018 - 17:49

Software Engineering and Computer Programming Discussion

imammal's picture

How to create a subrouting?

How to pass to subroutinges?

When to pass by reference and by value?

All about perl grep:

How to sort numbers ascending and descending from list where number is first value on each line.

How to extract first and last name and display last name then first name.

How to replace section of array with another smaller array - slice.

What are the three modes of perl? Scalar, Array and Hash.

 

 

imammal's picture

It's not slice but splice that manipulates arrays and subarrays:

https://perlmaven.com/splice-to-slice-and-dice-arrays-in-perl

Also, there are some scoping functions for variables in Perl like , my, local, and one more....

Regexp things like whitespace /W, and the beginning and end characters ^ and $.
https://perlmaven.com/regex-cheat-sheet

Passing by reference:
https://www.perlmonks.org/?node_id=6758

Define a subrouting and call it :
https://www.tutorialspoint.com/perl/perl_subroutines.htm

Using Grep() in Perl:
https://www.thoughtco.com/perl-array-grep-function-quick-tutorial-2641158

Perl Hashes:
https://perlmaven.com/perl-hashes

Perl sort():
http://perldoc.perl.org/functions/sort.html

How to deal with hashes and their value()s and key()s

What does shift() do and when to use it:

https://perlmaven.com/manipulating-perl-arrays

 

imammal's picture

Opening and Closing Files

There are following two functions with multiple forms, which can be used to open any new or existing file in Perl.

open FILEHANDLE, EXPR
open FILEHANDLE

sysopen FILEHANDLE, FILENAME, MODE, PERMS 

sysopen FILEHANDLE, FILENAME, MODE

https://www.tutorialspoint.com/perl/perl_files.htm

 

Post new comment