This document discusses anonymous data structures in Perl, including anonymous lists, hashes, and subroutines. It provides examples of using anonymous lists and hashes to create nested data structures like a hash of lists. It also discusses anonymous subroutines, known as closures, which allow functions to access variables that would normally be out of scope by preserving their references. Closures are explained to work by exploiting the lexical scope of where a function is declared and Perl's reference counting garbage collection system.
A Perl subroutine is a block of code that performs a specific task. Subroutines allow code to be reused and executed from different parts of a program with different parameters. They are defined using the "sub" keyword followed by the subroutine name and code block. Subroutines can accept arguments, return values, and contain private variables scoped to the subroutine using the "my" keyword. This modular approach improves code organization, reusability, and maintainability.
PHP Basics provides an overview of PHP syntax and variables. It explains how to define and assign variables, use data types like strings and arrays, and perform basic operations. Key points covered include using comments, semicolons, variable naming rules, operators, and the difference between echo and print statements. Constants and predefined variables are also summarized.
Perl uses special characters like $ @ % & to denote scalar, array, hash and subroutine variables respectively. Variables are named and can be assigned values using the = operator. Perl distinguishes between singular and plural variable names where singular names hold a single data item like a scalar value, and plural names hold collections of data items like arrays. The document then provides examples and details about defining different types of variables in Perl like scalars, arrays, hashes and using them to store and print values.
The document provides an overview of a Perl training session, covering topics like Perl introduction, variables, operators, control structures, regular expressions, and file input/output. The agenda is split into two parts - the first part covers basics of Perl like variables, I/O functions, and control statements. The second part focuses on regular expressions, file I/O, and installing modules. The document also includes detailed descriptions of various Perl concepts.
Scalar expressions and control structures in perlsana mateen
Scalar expressions in Perl combine data items using operators like arithmetic, string, comparison, and logical operators. Control structures like conditional expressions and loops like while, until, for, and foreach allow repetition and flow control. Blocks enclosed in curly braces group statements. The if-else, if-elsif conditional expressions and statements execute blocks of code conditionally. Looping constructs iterate until a condition is met or a fixed number of times. Loop refinements like last, next, and redo control flow within loops.
This document is a tutorial on the Perl programming language. It begins with a brief introduction to Perl, describing how it was created and some of its main uses and strengths. The tutorial then covers essential Perl concepts like variables, scalars, arrays, associative arrays, conditionals, and loops. It provides examples and explanations of Perl's syntax for these fundamental programming structures. The focus is on helping readers gain a basic understanding of the Perl language.
Perl is a general purpose programming language invented by Larry Wall in 1987. It can be used for web development, system scripting, and data processing. Key points:
- Perl can run on both UNIX and Windows systems, and code developed on one system can be portable to the other.
- Common uses of Perl include web development, like writing CGI scripts for websites, and processing large data sets in fields like finance, manufacturing, and genetics.
- Perl supports scalar and list data types. Scalar variables start with $ and can hold numbers or strings. Lists are collections of scalar data that can be stored in array variables prefixed with @.
- Perl includes control structures like if/else, for loops
Microsoft C# is a programming language designed for building enterprise applications that run on the .NET Framework. C# code is compiled as managed code, which benefits from services like garbage collection, language interoperability, security, and versioning support provided by the common language runtime. C# is introduced in Visual Studio .NET with project templates, designers, and other development tools. The .NET Framework library is used for C# programming. C# and Java share features like garbage collection, reflection, and interfaces to improve on C++.
A Perl subroutine is a block of code that performs a specific task. Subroutines allow code to be reused and executed from different parts of a program with different parameters. They are defined using the "sub" keyword followed by the subroutine name and code block. Subroutines can accept arguments, return values, and contain private variables scoped to the subroutine using the "my" keyword. This modular approach improves code organization, reusability, and maintainability.
PHP Basics provides an overview of PHP syntax and variables. It explains how to define and assign variables, use data types like strings and arrays, and perform basic operations. Key points covered include using comments, semicolons, variable naming rules, operators, and the difference between echo and print statements. Constants and predefined variables are also summarized.
Perl uses special characters like $ @ % & to denote scalar, array, hash and subroutine variables respectively. Variables are named and can be assigned values using the = operator. Perl distinguishes between singular and plural variable names where singular names hold a single data item like a scalar value, and plural names hold collections of data items like arrays. The document then provides examples and details about defining different types of variables in Perl like scalars, arrays, hashes and using them to store and print values.
The document provides an overview of a Perl training session, covering topics like Perl introduction, variables, operators, control structures, regular expressions, and file input/output. The agenda is split into two parts - the first part covers basics of Perl like variables, I/O functions, and control statements. The second part focuses on regular expressions, file I/O, and installing modules. The document also includes detailed descriptions of various Perl concepts.
Scalar expressions and control structures in perlsana mateen
Scalar expressions in Perl combine data items using operators like arithmetic, string, comparison, and logical operators. Control structures like conditional expressions and loops like while, until, for, and foreach allow repetition and flow control. Blocks enclosed in curly braces group statements. The if-else, if-elsif conditional expressions and statements execute blocks of code conditionally. Looping constructs iterate until a condition is met or a fixed number of times. Loop refinements like last, next, and redo control flow within loops.
This document is a tutorial on the Perl programming language. It begins with a brief introduction to Perl, describing how it was created and some of its main uses and strengths. The tutorial then covers essential Perl concepts like variables, scalars, arrays, associative arrays, conditionals, and loops. It provides examples and explanations of Perl's syntax for these fundamental programming structures. The focus is on helping readers gain a basic understanding of the Perl language.
Perl is a general purpose programming language invented by Larry Wall in 1987. It can be used for web development, system scripting, and data processing. Key points:
- Perl can run on both UNIX and Windows systems, and code developed on one system can be portable to the other.
- Common uses of Perl include web development, like writing CGI scripts for websites, and processing large data sets in fields like finance, manufacturing, and genetics.
- Perl supports scalar and list data types. Scalar variables start with $ and can hold numbers or strings. Lists are collections of scalar data that can be stored in array variables prefixed with @.
- Perl includes control structures like if/else, for loops
Microsoft C# is a programming language designed for building enterprise applications that run on the .NET Framework. C# code is compiled as managed code, which benefits from services like garbage collection, language interoperability, security, and versioning support provided by the common language runtime. C# is introduced in Visual Studio .NET with project templates, designers, and other development tools. The .NET Framework library is used for C# programming. C# and Java share features like garbage collection, reflection, and interfaces to improve on C++.
This document presents information about positional parameters in Unix. Positional parameters are a series of special variables ($0 through $9) that contain the contents of the command line. $0 refers to the name of the shell or shell script, $# is the number of positional parameters, and $? is the exit status of the last command executed. Special characters like <, >, |, etc. are also discussed along with their usage in Unix shells.
Shell scripting allows combining command sequences into simple scripts to reduce user effort. It involves writing commands for the shell to execute. Key aspects include variables, special variables, arrays, decision making with conditionals, loops, functions, regular expressions, file/user administration and IO redirection. Common tasks like system monitoring, logging and trapping signals can be automated through shell scripts.
Perl is an interpreted programming language originally developed by Larry Wall in 1987 for text manipulation and system administration tasks. It combines elements of C, shell scripting, and Unix system calls. Perl is useful for tasks like file parsing, text processing, CGI scripting, and database access. It runs on many operating systems and is freely available. The language uses scalar, array, and hash data types and includes control structures like conditionals and loops that are similar to C syntax. Perl can handle tasks like file input/output, regular expressions, and subroutines. Development is aided by its debugger and large collection of third-party modules.
Perl is an interpreted, general-purpose programming language originally developed for text manipulation and now used widely for a variety of tasks including system administration, web development, and more. It has a small number of basic data types (scalars, arrays, hashes) and supports both procedural and object-oriented programming. Key elements of Perl include its C-style syntax, dynamic typing, and emphasis on practical solutions over purity.
This document provides an overview of the awk programming language including its syntax, working methodology, built-in variables, operators, and examples. Some key points:
- Awk programs use patterns and actions to process input files line by line. Patterns are matched against each record and associated actions are performed.
- Built-in variables like FS, OFS, RS, NR, NF, FILENAME help manipulate the input/output and provide record information.
- Operators allow arithmetic, string, comparison, assignment and regular expression operations.
- Examples demonstrate using built-ins and operators to count fields, select records, and manipulate data from /etc/passwd.
This is the seventh set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This document provides an overview and schedule for a one-day introduction to Perl programming course. It covers what will be taught including creating and running Perl programs, variables, operators, functions, input/output, and more. The schedule includes breaks and lunch and notes resources available online for the slides.
This document provides an overview of the Perl programming language. It covers what Perl is, how to create and run Perl scripts, scalar and array variables, hashes, control structures like if/else and loops, file operations, and common Perl functions like split and join. Advanced Perl concepts like subroutines, regular expressions, and object-oriented programming are also mentioned. Resources for learning more about Perl like documentation, books, and mailing lists are provided at the end.
Regular expressions are a powerful tool for searching, matching, and parsing text patterns. They allow complex text patterns to be matched with a standardized syntax. All modern programming languages include regular expression libraries. Regular expressions can be used to search strings, replace parts of strings, split strings, and find all occurrences of a pattern in a string. They are useful for tasks like validating formats, parsing text, and finding/replacing text. This document provides examples of common regular expression patterns and methods for using regular expressions in Python.
Strings,patterns and regular expressions in perlsana mateen
The document provides an introduction to regular expressions (regex). It discusses that regex allow for defining patterns to match strings. It then covers simple regex patterns and operators like character classes, quantifiers, alternations, grouping and anchors. The document also discusses more advanced regex topics such as back references, match operators, substitution operators, and the split operator.
The document provides an introduction to Perl programming and regular expressions. It begins with simple Perl programs to print text and take user input. It then covers executing external commands, variables, operators, loops, and file operations. The document also introduces regular expressions, explaining patterns, anchors, character classes, alternation, grouping, and repetition quantifiers. It provides examples and discusses principles for matching strings with regular expressions.
The document discusses regular expressions and text processing in Python. It covers various components of regular expressions like literals, escape sequences, character classes, and metacharacters. It also discusses different regular expression methods in Python like match, search, split, sub, findall, finditer, compile and groupdict. The document provides examples of using these regular expression methods to search, find, replace and extract patterns from text.
awk is a very versatile programming language for working on text files. It is more powerful than sed but less complex than C. It is an excellent filter and report writer. In this class I will go over the elements and features of gawk, (the Free Software foundation version of awk), examples and a few one-liners.
The document discusses various techniques for querying databases and generating reports from the query results using Perl. It provides examples of using DBI and SQL to query databases and format output, techniques for binding variables, preparing queries, and fetching and printing rows. Additional examples show merging and transforming tabular data for different output formats.
This document provides an overview of key PHP concepts including:
1) PHP requires statements to end with semicolons and supports different comment styles.
2) PHP supports scalar, compound, and special types like booleans, integers, strings, arrays, objects, resources and NULL.
3) Strings can be specified using single quotes, double quotes, heredoc, and nowdoc syntax. Variable names are expanded in double-quoted strings.
4) Arrays are ordered maps that can be created using array syntax or short array syntax, and elements accessed using square brackets.
PHP is a scripting language commonly used for web development. It allows dynamic generation of web page content through embedded PHP code. Some key things PHP can do include interacting with databases, processing user input, file handling, and more. PHP code is embedded within HTML using <?php ?> tags and variables, control structures, and other programming elements allow writing logic and dynamic functionality.
This is the second set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This document provides information on the Franklin DuraSeal plug valve. It describes the valve as having an improved design from previous models with a more durable body and reliable stem seal. The valve seals mechanically without needing sealant and can be easily automated. Parts are interchangeable with previous models and it can be repaired in the field without special tools by removing parts from the top or bottom.
This two page document appears to be a regulatory examination record for an individual named DD Coetzee with an ID number of 7810280238085. The document provides a web link on both pages to access further certification details on a regulatory database using the reference number 700037917.
This document presents information about positional parameters in Unix. Positional parameters are a series of special variables ($0 through $9) that contain the contents of the command line. $0 refers to the name of the shell or shell script, $# is the number of positional parameters, and $? is the exit status of the last command executed. Special characters like <, >, |, etc. are also discussed along with their usage in Unix shells.
Shell scripting allows combining command sequences into simple scripts to reduce user effort. It involves writing commands for the shell to execute. Key aspects include variables, special variables, arrays, decision making with conditionals, loops, functions, regular expressions, file/user administration and IO redirection. Common tasks like system monitoring, logging and trapping signals can be automated through shell scripts.
Perl is an interpreted programming language originally developed by Larry Wall in 1987 for text manipulation and system administration tasks. It combines elements of C, shell scripting, and Unix system calls. Perl is useful for tasks like file parsing, text processing, CGI scripting, and database access. It runs on many operating systems and is freely available. The language uses scalar, array, and hash data types and includes control structures like conditionals and loops that are similar to C syntax. Perl can handle tasks like file input/output, regular expressions, and subroutines. Development is aided by its debugger and large collection of third-party modules.
Perl is an interpreted, general-purpose programming language originally developed for text manipulation and now used widely for a variety of tasks including system administration, web development, and more. It has a small number of basic data types (scalars, arrays, hashes) and supports both procedural and object-oriented programming. Key elements of Perl include its C-style syntax, dynamic typing, and emphasis on practical solutions over purity.
This document provides an overview of the awk programming language including its syntax, working methodology, built-in variables, operators, and examples. Some key points:
- Awk programs use patterns and actions to process input files line by line. Patterns are matched against each record and associated actions are performed.
- Built-in variables like FS, OFS, RS, NR, NF, FILENAME help manipulate the input/output and provide record information.
- Operators allow arithmetic, string, comparison, assignment and regular expression operations.
- Examples demonstrate using built-ins and operators to count fields, select records, and manipulate data from /etc/passwd.
This is the seventh set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This document provides an overview and schedule for a one-day introduction to Perl programming course. It covers what will be taught including creating and running Perl programs, variables, operators, functions, input/output, and more. The schedule includes breaks and lunch and notes resources available online for the slides.
This document provides an overview of the Perl programming language. It covers what Perl is, how to create and run Perl scripts, scalar and array variables, hashes, control structures like if/else and loops, file operations, and common Perl functions like split and join. Advanced Perl concepts like subroutines, regular expressions, and object-oriented programming are also mentioned. Resources for learning more about Perl like documentation, books, and mailing lists are provided at the end.
Regular expressions are a powerful tool for searching, matching, and parsing text patterns. They allow complex text patterns to be matched with a standardized syntax. All modern programming languages include regular expression libraries. Regular expressions can be used to search strings, replace parts of strings, split strings, and find all occurrences of a pattern in a string. They are useful for tasks like validating formats, parsing text, and finding/replacing text. This document provides examples of common regular expression patterns and methods for using regular expressions in Python.
Strings,patterns and regular expressions in perlsana mateen
The document provides an introduction to regular expressions (regex). It discusses that regex allow for defining patterns to match strings. It then covers simple regex patterns and operators like character classes, quantifiers, alternations, grouping and anchors. The document also discusses more advanced regex topics such as back references, match operators, substitution operators, and the split operator.
The document provides an introduction to Perl programming and regular expressions. It begins with simple Perl programs to print text and take user input. It then covers executing external commands, variables, operators, loops, and file operations. The document also introduces regular expressions, explaining patterns, anchors, character classes, alternation, grouping, and repetition quantifiers. It provides examples and discusses principles for matching strings with regular expressions.
The document discusses regular expressions and text processing in Python. It covers various components of regular expressions like literals, escape sequences, character classes, and metacharacters. It also discusses different regular expression methods in Python like match, search, split, sub, findall, finditer, compile and groupdict. The document provides examples of using these regular expression methods to search, find, replace and extract patterns from text.
awk is a very versatile programming language for working on text files. It is more powerful than sed but less complex than C. It is an excellent filter and report writer. In this class I will go over the elements and features of gawk, (the Free Software foundation version of awk), examples and a few one-liners.
The document discusses various techniques for querying databases and generating reports from the query results using Perl. It provides examples of using DBI and SQL to query databases and format output, techniques for binding variables, preparing queries, and fetching and printing rows. Additional examples show merging and transforming tabular data for different output formats.
This document provides an overview of key PHP concepts including:
1) PHP requires statements to end with semicolons and supports different comment styles.
2) PHP supports scalar, compound, and special types like booleans, integers, strings, arrays, objects, resources and NULL.
3) Strings can be specified using single quotes, double quotes, heredoc, and nowdoc syntax. Variable names are expanded in double-quoted strings.
4) Arrays are ordered maps that can be created using array syntax or short array syntax, and elements accessed using square brackets.
PHP is a scripting language commonly used for web development. It allows dynamic generation of web page content through embedded PHP code. Some key things PHP can do include interacting with databases, processing user input, file handling, and more. PHP code is embedded within HTML using <?php ?> tags and variables, control structures, and other programming elements allow writing logic and dynamic functionality.
This is the second set of slightly updated slides from a Perl programming course that I held some years ago.
I want to share it with everyone looking for intransitive Perl-knowledge.
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
This document provides information on the Franklin DuraSeal plug valve. It describes the valve as having an improved design from previous models with a more durable body and reliable stem seal. The valve seals mechanically without needing sealant and can be easily automated. Parts are interchangeable with previous models and it can be repaired in the field without special tools by removing parts from the top or bottom.
This two page document appears to be a regulatory examination record for an individual named DD Coetzee with an ID number of 7810280238085. The document provides a web link on both pages to access further certification details on a regulatory database using the reference number 700037917.
Henry Barnard successfully completed the First Level Regulatory Examination: Representatives on February 23, 2015. This certificate confirms he passed the exam with the certificate number PR136999. The Chief Executive Officer certified the examination results on the specified date.
Cuba está ubicada en el Mar Caribe cerca de Estados Unidos y México, y tiene una superficie de 109,884 km2. La cultura cubana es una mezcla de influencias europeas, africanas y asiáticas que ha dado lugar a manifestaciones musicales como el son y el chachachá. El clima de Cuba es subtropical con estaciones secas y húmedas, y las temperaturas promedio van de 18-28°C.
The beverage market in China is one of the fastest growing markets in the Chinese food industry.
As living standards have improved in China, beverage consumption has changed. Consumers are searching for a greater diversity of products, and further, have become more and more discerning.
Este documento resume los fundamentos de la seriación y la conservación numérica en niños. Explica que la seriación implica ordenar objetos según un criterio como el tamaño o la posición, requiriendo propiedades como la reciprocidad, la transitividad y la reversibilidad. También describe las cuatro fases por las que pasan los niños para desarrollar la conservación de la cantidad, entendiendo que la cantidad no cambia aunque la disposición de los objetos sí.
Este documento describe los orígenes y antecedentes históricos de la teoría de la administración. Explica las principales funciones de la administración como la planificación, organización, dirección y control. También resume varias teorías clave sobre la administración como la jerarquía de necesidades de Maslow, la teoría de los dos factores de Herzberg, y las teorías X y Y de McGregor. Además, menciona teorías como la teoría del desarrollo organizacional, la teoría de las organizaciones de March y
The document provides information about New Zealand Trade & Enterprise's (NZTE) Digital Program for Australia, which establishes four landing pads in Melbourne and Sydney to help New Zealand technology companies enter, establish, and grow in the Australian market. The program partners NZTE with York Butter Factory in Melbourne and Hub Australia in Sydney, Melbourne, and Adelaide to provide office space, networking opportunities, advisory services, and support from NZTE business managers. Eligible companies can apply to spend up to six months at a landing pad with NZTE co-investing 40% of costs to help companies validate the Australian market and develop local strategies.
Tha Price Of Knowledge.Pt.1.newer.html.doc.docxMCDub
The document contains lyrics from several songs written by Murad Camarad Wysinger and other artists. The first song, "Orange Sun!", describes the author as the number one and an "extremely exalted one" like the "real-ass Orange Sun". The second song, "So Dis Is What It Do! Pt.3", is about doing what you're supposed to do. The third song, "Foe Me & Only You! Pt.1", is directed at a "baby-boo" about doing what they're supposed to do for each other. The fourth song, "Tha Price Of Knowledge! Pt.1" discusses staying positive and giving, and how that is "tha price
Presentación automatización de procesos industriales 3er parcialEden Rodríguez
El documento trata sobre la automatización de procesos industriales y la robótica. Explica que la robótica es una forma de automatización industrial y describe las diferentes clases de automatización industrial. También define qué es un robot industrial y describe su anatomía, incluyendo sus componentes principales como las articulaciones, los grados de libertad y las configuraciones morfológicas más comunes. Finalmente, enumera los parámetros característicos más importantes de los robots industriales.
This document contains the lyrics to three songs - "A-Sign!", "Grand Fatha! Pt.2", and "Right Way To Tha Earth!" - that are part of an album titled "Aztex Indian Army Pt.3". The lyrics describe themes of defining oneself, being a good family member, and ruling the earth in the right way. The document lists the song titles, lyrics, and copyright information for an album written by multiple authors.
This document is a curriculum vitae for Kannusamy Ramaiyan that summarizes his professional experience and qualifications. It outlines his 7 years of experience as a CNC programmer, setter, and operator on machines like Makino and Fanuc. It also lists his educational background, including an NTC in turning from an Industrial Training Institute in India and a Precision Machining (Milling) qualification from ITE Skills Level II in Singapore. The CV indicates he is seeking a challenging career in CNC programming and operating to further his machining knowledge and support company growth.
Tha Price Of Knowledge.Pt.2.newer.html.doc.docxMCDub
The document appears to be lyrics from a hip hop album titled "Tha Price Of Knowledge! Pt.2" written by Murad Camarad Wysinger and others. It contains lyrics for five songs: "Sun Rod!", "So Dis Is What It Do! Pt.4", "Foe Me & Only You! Pt.2", "Tha Price Of Knowledge! Pt.1", and "Tha Price Of Knowledge! Pt.2". The lyrics focus on themes of staying positive, not needing negativity, always giving knowledge to others, and living righteously.
This document is a tutorial on the Perl programming language. It introduces Perl and how to run Perl programs from the command line. It discusses the basics of the Perl language, including variables, scalars, arrays, and literals. It covers how to assign values to variables, different types of strings and string operators, and numbers and arithmetic operators. It also provides examples of using arrays in Perl. The overall goal of the tutorial is to provide readers with a basic understanding of the Perl language.
Perl is a programming language that was originally released in 1987. It has become widely used for tasks like CGI scripting, databases, and XML processing. Perl is known as a "glue language" because it can interact with many popular applications.
The Comprehensive Perl Archive Network (CPAN) provides a comprehensive library of Perl extension modules, similar to frameworks like J2EE and .NET. CPAN has helped Perl integrate with other languages like C, C++, and Java.
Perl's strength comes from its active user community which maintains resources like CPAN, documentation sites, and local user groups. Perl powers many popular websites and is often called the "duct tape of the Internet" due to its
You Can Do It! Start Using Perl to Handle Your Voyager NeedsRoy Zimmer
This document provides an introduction to the Perl programming language. It discusses Perl nomenclature, basic syntax like variables and data types, control structures, file input/output, regular expressions, and more. The goal is to get readers started using Perl for their needs.
Training on php by cyber security infotech (csi). Cs-infotech is one of the best cyber security and website development company in India. we also provide Network security, software development, Cyber security corporate training and SEO and SMO services.
Our services are Employee Monitoring System,Employee Monitoring Software,Website Audit,Network Security,Network Audit and Information Security.
This document provides an introduction to Perl programming by discussing what Perl is used for, why it is useful, and how to get started with the language. It covers installing Perl on Windows and Linux, using variables and data structures like scalars, arrays, hashes, and references. It also demonstrates basic Perl syntax like conditional statements, loops, file I/O, and running commands. The goal is to get readers writing basic Perl code quickly while highlighting some key features of the language.
Perl is an interpreted, high-level programming language that can be used for general programming as well as web development and system scripting. It borrows features from other languages like C, shell scripting, AWK and sed. Perl scripts can be executed without needing to be compiled. Perl supports both procedural and object-oriented programming. It has a large collection of third party modules available that extend its capabilities. Perl is commonly used for text processing and manipulating files due to its powerful regular expression abilities. It is also well suited for web development and can be embedded into web servers.
This document discusses user-defined functions in Perl. It provides examples of how to declare functions using the 'sub' keyword, pass parameters to functions, and set default parameters. It also covers calling functions, returning values from functions, and variable scope within functions. The examples show how functions can be used to split code into reusable pieces and pass data between different parts of a program.
This document provides an overview of the Perl programming language. It discusses Perl's history and introduction, beginning with Perl scripts, data types like scalars, lists, arrays, and hashes. It also covers Perl operators, conditional statements, regular expressions, subroutines, and file handling. The document is intended as an introduction to Perl and provides examples of basic Perl syntax and functions.
This document provides an introduction to basic Perl programming. It begins with a simple "Hello World" program and explains each line of code. It then discusses running and debugging programs, scalar variables, arithmetic operations, string interpolation, array variables, and basic file handling in Perl. The key topics covered are printing output, assigning variables, accessing array elements, and opening/reading/closing files.
Plunging Into Perl While Avoiding the Deep End (mostly)Roy Zimmer
This document provides an introduction to the Perl programming language. It discusses Perl nomenclature, attributes, variables, scopes, file input/output, string manipulation, regular expressions, and the DBI module for connecting to databases from Perl scripts. Examples are provided for common Perl programming tasks like reading files, splitting strings, formatting output, and executing SQL queries.
This document discusses regular expressions (regexes) in Perl programming. It provides three examples that demonstrate extracting date values from a string using different regex techniques. It then discusses some key regex concepts like quantifiers, grouping, anchors, character classes and more. Code examples are provided to illustrate each concept. The goal is to help readers better understand how to leverage the powerful regex engine in Perl to perform complex text matching and manipulation tasks.
The document provides an overview of an introduction to Perl programming course. It covers topics that will be discussed including creating and running Perl programs, variables, operators, functions, input/output, and conditional statements. The schedule lists times for beginning sessions, breaks, and ending each day. Resources for slides and mailing lists are also provided.
The document discusses hashes in Perl. It explains that hashes store collections of scalars indexed by name like keys in a real-life phone directory. It provides examples of using hashes to store phone numbers and names, and accessing values using keys. It also discusses using foreach to iterate over hashes and sort to sort the keys or values of a hash.
The document discusses hashes in Perl programming. It explains that hashes allow the storage of key-value pairs and do not maintain order. It provides examples of creating a hash, accessing values using keys, and iterating through keys and values. It also discusses using hashes to store the genetic code and amino acid translations.
This document provides an overview and schedule for an introduction to Perl course. The key topics that will be covered include: what Perl is, creating and running Perl programs, Perl variables, operators and functions, conditional constructs, subroutines, regular expressions, finding and using modules. The schedule outlines breaks and lunch over the course of the day from 09:45 to 17:00. Resources for slides and further information are also listed.
Perl is a general-purpose programming language created by Larry Wall in 1987. It supports both procedural and object-oriented programming. Perl is useful for tasks like web development, system administration, text processing and more due to its powerful built-in support for text processing and large collection of third-party modules. Basic Perl syntax includes variables starting with $, @, and % for scalars, arrays, and hashes respectively. Conditional and looping constructs like if/else, while, and for are also supported.
The document provides an introduction to the Bund programming language. Some key features of Bund include:
- It is a simple, stack-based functional language tightly integrated with Python
- Functions are first-class citizens
- Namespaces provide scoping instead of modules
- Support for delayed execution, reverse and direct stack coding, partial application, code as data, and dynamic code generation
- The author created Bund to experiment with PEG parsers and teach himself new tricks as an experienced programmer
The document provides an overview of the Ruby programming language for Perl programmers. Some key points:
- Ruby is an object-oriented scripting language that is interpreted, not compiled. It draws influences from Perl, Smalltalk, Lisp, and C.
- Ruby supports functional, aspect-oriented, and design-by-contract programming paradigms. It is well-suited for practices like extreme programming.
- Core concepts include classes, modules, blocks/iterators, exceptions, regular expressions and strings. Common data structures include arrays, hashes, ranges and more.
- Examples demonstrate basic syntax like variables, loops, conditions, classes and modules. Ruby emphasizes flexibility, dynamism and "
This document provides an overview of the Ruby programming language for Perl programmers. Ruby is a dynamic, reflective, object-oriented scripting language that is similar to Perl in many ways but also differs in its stronger object-oriented focus. The document discusses Ruby's syntax, core classes, object model, modules, blocks and iterators, and other features.
1. Within the code sample above, the only
unfamiliar symbol should be the square
brackets, these are used to denote
anonymous lists. Anonymous lists are
arrays without a name. A clue to this is
the square brackets ‘[]‘, usually seen
when accessing elements of an array:
print "$some_array[4]n";
So it’s not really counter intuitive that
square brackets be used elsewhere for
arrays. Using this philosophy can you
guess what sigils we use to create an
anonymous hash? We use ‘{}‘ curly
braces, as we use curly braces to retrieve
a value from a hash:
print "$some_hash{four}n";
Or if you prefer:
print $some_hash{'four'} . "n";
Returning to our list of users favourite
commands again, when we need
to reference the data inside our
nested structures, we need a means of
specifying the element inside the parent
data structure we want. We can access
‘%commands’, in the normal fashion:
#returns a string akin to U
'ARRAY(0x1ab54d0)'
print "$commands{'Billy'}n";
But this returns a string that looks like
“ARRAY(0x1ab54d0)” which actually
tells us a lot but not what we wanted.
The uppercase ‘ARRAY’ tells us that the
returned value is of an array reference
type and the characters with in the
parenthesis tell us where Perl stores the
reference. To access the data from the list
within the hash, we use the arrow
operator ‘->‘, this enables us to access
the list within the hash:
$commands{Billy}->[0];
This will return the first item from Billy’s
list of shell commands. For the purposes
of this exercise, we’ll say that the list
places favourite items first.
We can now make a hash of lists using
anonymous lists, we can make an array
of hashes too. you may by now be asking
yourself if there any other things that can
be made anonymously.
Anonymous Subroutines
It’s the Perl way, if you’ve got
anonymous hashes and anonymous lists,
then what about the functions and the
scalars? Perl provides them too. An
anonymous function seems like an odd
thing to have, until you get sufficiently
lazy, then you find yourself using them.
my %func = (
stdout => sub { print @_ },
log => sub { print LOG @_ },
stderr => sub U
{ print STDERR @_ },
not_stderr => sub {
print @_;
print LOG @_;
},
not_stdout => sub {
print STDERR @_;
print LOG @_;
},
all => sub {
print STDERR @_;
print LOG @_;
print @_;
}
);
# Print to all bar stdout:
&$func{not_stdout}( 'hello', U
66 November 2002 www.linux-magazine.com
W
hile the aspects of Perl that
have been covered in this
series so far are enough to
start you upon your way to becoming yet
another Perl hacker they’ve been the
basics of the language and offer nothing
other languages do not, albeit in a lot
less lines of code.
Nested Data structures
Perl facilitates complex datastructures in
several ways, by far the most readily
understood are the “hash of hashes” and
“list of lists”; these are nested data-
structures. It is also possible to have
“lists of hashes” and “hashes of lists”.
What we mean when we say a “list of
hashes” is that the data structure is a list
that contains hashes as its elements. One
example might be a list of people and for
each person a list of their top five
favourite shell commands:
Terry: rm -rf*, chmod 777, U
kill -9, ln -s, reboot
Billy: vim, df -h, ls -lah, U
ps -eaf, mutt
We could write that very quickly in Perl,
using nested data structures. In this
instance a hash of lists appears to be the
most sensible as the user’s names will be
unique identifiers and the top five
commands have no other significance
but the order in which they occur. Using
a hash structure for the names and a list
for the commands for each user we can
access the information in an intuitive
fashion and pull out details such as the
favourite command used by Billy. We’ll
show ways of obtaining this data later.
First we’d better store the data. One way
of writing this in Perl would be:
my %commands = (
Terry => [ 'rm -rf*', 'chmod U
777', 'kill -9', 'ln -s', U
'reboot' ],
Billy => [ 'vim', 'df -h', U
'ls -lah', 'ps -eaf', 'mutt' ]
);
This month we introduce some of the more powerful idioms and features of
Perl and show why it’s still one of the hackers languages of choice.
BY DEAN WILSON AND FRANK BOOTH
Perl: Part 6
Thinking in Line Noise
Perl Tutorial: Part 6PROGRAMMING
2. 'world' );
# Print lots of times to each:
&$func{$_} for keys %func;
The last command seems completely nonsensical as it’s a
hash data structure, there is no telling what order the
elements will emerge when using the keys command,
which could cause problems. If you require order, use an
array. The following example will produce a set of error
levels, increasing in urgency.
my @warn = (
sub { print STDERR @_ },
sub { print LOG @_ },
sub { print @_ },
sub { die "I can't function under these U
conditions: ", @_,"n" }
);
sub notify {
my $error_level = shift || -1;
&$func{$_}(@_) for ( 0..$error_level );
-1
}
This example will report messages back according to the
error level. If the error level was 1, it would write to
‘STDERR’ and the log file. At level 3, it would write to the
‘STDERR’, ‘LOG’, ‘STDOUT’ and the finally stop the
program with a final message. It does this by looping
through the array of anonymous subroutines. There are a
few things that happen implicitly, that we’ll examine now:
my $error_level = shift || -1;
When variables are passed into a function they’re passed
in as an array ( @_ ). The ‘shift’ operator removes the first
item from an array, its default is ‘@_’, so if no array is
specified, it defaults to using @_. If the ‘@_’ array is false
( it has no contents ) the value -1 is placed in the variable
instead, why will become clear soon.
&$func{$_}(@_) for 0..$error_level;
This line uses Perl’s ‘for’ looping construct to iterate over
the first part of the line. In this instance it will repeat for
every number from 0 to $error_level, the value for the cur-
rent iteration will be put into the default variable ‘$_’.
Since the ‘for’ loop occurs at the end of the line the loop
condition doesn’t need braces. It is worth noting that the
range operator ( ‘..’ ) will not work backwards, it won’t
count from 10 to 1 using 10..1, it will merely skip the
entire loop as having failed on the first attempt.
The first part of the line calls the function from the array
‘@warn’, the element it references is the value of ‘$_’,
and the parameters the function is passed are the
remainder of the parameters passed to the notify function.
The ampersand ‘&‘ denotes that the thing in the hash is a
function. It is necessary to explain that the contents are a
Putting you in the winners’ circle
with open standards
SuSE Linux 8.1SuSE Linux 8.1
SuSE Linux AG
Deutschherrnstr. 15–19
90429 Nürnberg
Germany
For further information visit our websites:
www.suse.com www.suse.co.uk www.suse.de/en/
For beginners: SuSE Linux Personal 8.1
•Free MS-Office compatible office suites
• Secure Internet and
eMail communication
• Easy-to-install desktop solutions
•Extensive multi-media support
•Graphics manipulation tools for
digital cameras, scanners etc.
For professionals: SuSE Linux Professional 8.1
•Complete small office solution
• All you need to run your office network
• Configurable security with
SuSE Firewall 2
•Additional secure file systems
•Numerous development environments
and programming tools
SuSE Linux is celebrating its 10 year
anniversary! We owe our success to
you, thus we would like to thank you
for your loyalty.
NEW
3. $_ = ref( $reference);
/SCALAR/ and return U
$$reference;
/ARRAY/ and return join U
(', ',@$reference );
/HASH/ and return join U
(', ', keys %$reference );
$_
}
This program uses the ‘ref’ function to
determine the data type of a reference.
‘ref’ returns one of a number of possible
values including the more common:
SCALAR, ARRAY, HASH or ‘’. The last
value indicates that the parameter sent
was in fact not a reference at all.
What the code does is define the
response taken when passed different
data types: Here is a list of the input type
and result output. ‘ref’ is extremely useful
when using generic datastructures that
can nest any type of data and have
no defined limit of depth to which it
is nested as it allows fully automatic
determination of the references type. You
may want to create a reference to an
existing structure, to enable access from a
function, or to link to a dynamically
structured list. We use the ‘‘ backslash
operator to dereferrence a value:
# Makes a reference to a scalar
my $foo_ref = $foo;
# Makes a reference to @foo U
called $foo_arrref
my $foo_arrref = @foo;
# Make an array of references.
my @list_of_arrays = U
( @foo, @bar, @baz );
# this can also be written:
@list_of_arrays = U
( @foo, @bar, @baz );
Here be Dragons
Closures are one of the more complex
features of Perl in that they build upon
previous knowledge and require a grasp
of a number of the language basics such
as scope and pass by reference before
they become readily comprehensible.
However like most magic, you don’t
need to understand it to wield it.
A closure is a function that exploits
both the lexical scope it is declared in
and Perl’s garbage collection algorithm
to preserve a variable beyond its ex-
pected lifetime.
We’ve not yet discussed Perl’s garbage
disposal routine in any depth as it is
unobtrusive and rarely falls to the
programmer to know or care what it
does and how it works. It tidies up after
us and ensures that the memory no
longer used in our programs is released.
The garbage collector in Perl works on
a very simple (in theory) principle
known as reference counting. Whenever
a new variable is created it starts off with
a reference count of 1 and each time a
reference to that variable is taken the
count increases by one.
Each time a reference to the variable
falls out of scope the reference count
decreases by one and when no more
references point to it (IE the reference
count is zero) the variable is ‘reaped’
by Perl’s garbage collection and the
memory it used is released automaticly,
no explicit ‘malloc’ and ‘free’ for us! To
clarify how closures work let’s look at
what we know. We know that a variable
declared in the scope of a block only
exists for that block…
{
my $count;
print "$countn";
}
# this line fails compilation
# as $count is not visible
print "$countn";
We also know that a function is global
regardless of where it is defined:
{
sub phrase {
return U
' I can be called anywhere ';
}
}
print phrase(); # this works.
So what happens when we mix the two?
{
my $count = 0;
sub set($){ $count = shift }
sub incr(){ $count++ }
sub getcnt() { $count }
}
set(5); # sets the count to 5
incr; # adds 1 to count.
#this prints 6
print getcnt(), "n";
68 November 2002 www.linux-magazine.com
function, otherwise Perl would expect a
normal scalar value and would interpret
the function as such.
References
References are scalar variables used to
point to anonymous data types and
functions. In all the above examples
we’ve relied on the containing data
structure to ensure we look at the data
we meant to or call the function we
intended. We can just as easily use a
scalar variable to do the same task.
my $array_reference = U
[ 1, 2, 3, 4, 5 ];
my $hash_reference = {
beef => 'corned',
cabbage => 'over-cooked'
};
We refer to the elements within the refer-
ence using the arrow operator ‘->‘:
$array_reference->[0];
@$array_reference[0];
$hash_reference->{beef};
%$hash_reference{beef};
We can refer to anonymous functions:
$func = sub { print "foon" };
&$func;
We can refer to scalar values too:
$func = '3.14';
print $$func;
Here we’ve prefixed the variable we’re
applying with a data type constraint.
Putting the wrong type in a data type
constraint will result in the program
concluding rather sooner than you’d
hoped, if you don’t know what type of
data to expect try something like this:
sub handleref ($) {
my $reference = U
shift or return;
Perl Tutorial: Part 6PROGRAMMING
Type Action
SCALAR Return thevalue.
HASH Returnajoinedlist ofkeys.
ARRAY Returnajoinedlist ofvalues.
NOTAREF Return thevalueitself.
DATA TYPES
4. We get a variable named ‘$count’ that
exists only for the functions ‘set’, ‘incr’
and ‘getcnt’ any other attempt to
reference the variable will fail. This gives
us a “tamed” global variable that has
limited ways of being altered while also
providing some data encapsulation; A
global variable we can manage.
There are instances when global
variables need to be used and there are
instances when you can use a closure
instead to make the code a little safer
and avoid another global. If you think
this looks a little like very primative
Object Orientation (OO) then you may
not be surprised to know that these
principles will hold you in good stead
when we get to Perl’s OO facilities.
While the above is a useful application
of a closure, it is not the most common
use of closures. In the example below we
use an anonymous subroutine to create a
bespoke function. This is probably the
most popular and often seen use of
closures within Perl.
sub hello($) {
my $message = shift;
return sub U
{ print "Hello $messagen";
}
This is a customisable function. A
closure can be created by calling the
function like so:
my $std = hello('world');
my $song = hello('dolly');
my $phrase = hello('nurse!');
We can call all the separate closures
using the ampersand symbol to signify
its a function and the variable that holds
the reference to the anonymous
subroutine. So:
&$std #will print: Hello world.
&$song #will print: Hello dolly.
&$phrase # will print: U
Hello nurse!
These rather trite examples serve only to
illustrate the basics of how closures
work but hopefully they will whet your
appetite for the advanced potential uses
they provide once you have made it past
the initial hurdle and understand how
they work.
Data::Dumper
Once you’ve started to use more
complex references you’ll inevitably
want to view the contents of a complex
data structure.
While your first instinct may be
to ‘unroll’ the structure with a number
of loops, a better approach would be to
use a module from the Perl core (it’s
installed by default) called ‘Data::U
Dumper’. We’ll show uses of Data::U
Dumper here without explaining all the
details behind using modules as a gentle
introduction.
A full explanation will be covered in
a future column. ‘Data::Dumper’ is a
module that is capable of serializing Perl
data structures so they can be printed to
screen or even written to a file while
remaining valid Perl code.
The last point is an important one that
warrants a deeper explanation, the
stringified version of the data structure is
still valid Perl code, this allows it to be
used in an ‘eval’ to recreate the
structures in the current application and
even to be read in from a file and used as
a simple persistence layer.
The example ‘simple_dump.pl’ below
shows a rudimentary use of ‘Data::U
Dumper’ to print a hash containing hash
references. Although the example may
look slightly contrived the principles can
still be applied to larger code such
as a function passing back a complex
hash ref of configuration settings such
as for example an ‘ini’ file style con-
figuration.
#Example: simple_dump.pl
use Data::Dumper;
my (%config, $config_ref);
%config = (
email => {
workdir => U
'/home/dwilson/work',
logdir => '/var/log/U
perlapps/examples/email'
},
news => {
workdir => U
'/home/dwilson/work',
logdir => '/var/log/U
perlapps/examples/news'
}
);
$config_ref = %config;
print Dumper($config_ref);
This example shows a simple use of
Data::Dumper’s procedural interface to
print the representation to the console.
The first line imports the ‘Data::Dumper’
module and allows any of its exported
functions to be called. We then create
both a hash and a scalar and immedi-
ately put some sample data in the hash.
It’s useful to note how the hash
of hashes is built up manually as
the ‘Data::Dumper’ representation is
remarkable similar.
The row following should now
be familiar as we take a reference to
the hash. Finally we make use
of Data::Dumper with the exported
‘Dumper’ function. If you run the code
you’ll see how closely the output
resembles the original code.
The ‘Data::Dumper’ module itself can
be used in either a procedural or object
orientated (OO) fashion allowing it to fit
inconspicuously in to the surrounding
code as all good third party modules
should. The example below uses the OO
interfaces and requires only minimal
changes:
#Example: simple_dump_oo.pl
#above here we would create U
the hash
my $dumper = Data::Dumper->U
new([$config_ref]);
print $dumper->U
Dump($config_ref);
We start the ‘simple_dump_oo.pl’
example with the same set up code used
in the ‘simple_dump.pl’ example. The
code changes begin in the last few lines
as we create an instance of the
Data::Dumper class and pass in the
reference we would like to have it work
on, notice the use of braces to force list
context, Data::Dumper’s constructor
expects its first argument (A second
optional argument is allowed) to be an
array ref.
Once we have a variable holding
the object we then call the ‘Dump’
method and get the same on screen
information we did with the procedural
version.
Now that the basic use of Data::U
Dumper has been shown we move on to
some useful options that can be config-
ured to customize how Data::Dumper
represents its output. These options are
69www.linux-magazine.com November 2002
PROGRAMMINGPerl Tutorial: Part 6
5. While the default settings are often
enough you may occasionally need
to tweak the settings to suit the use
the module is put to. Two modified
settings are $Data::Dumper::Indent and
$Data::Dumper::Useqq or in OO parlance
$OBJ->Indent and $OBJ->Useqq
The first of these two ‘$Data::U
Dumper::Indent’, controls the general
human readability of the output struc-
ture. From the minimum value of ‘0’
which strips out all but the essential
white space leaving the output as valid
perl code but not easily human readable
through to a maximum value of ‘3’. The
default value is ‘2’ and this causes the
output to have newlines, nicely lines up
entries in hashes and similar and
sensible indentation.
While a value of ‘2’ is often enough if
you are dealing with a large number of
with complex arrays then it is worth at
least considering a value of ‘3’ as its
main benefit is to put out the array index
along with the data allowing quick
visual look-ups at the cost of doubling
the output size. In practical terms it is
often enough to leave the setting at its
default value but if you are using
Data::Dumper to serialize the structures
to disk then you can get away with a
lower level as it only needs to be
machine readable.
The second of the more useful options
is the ‘$Data::Dumper::Useqq’ option
which causes the data to be put out in a
more normalized form which includes
white space represented as meta-
characters ([ntr] instead of literal
white space) characters that are
considered unsafe (Such as the ‘$‘ will
be escaped and non-printable characters
will be printed as quoted octal integers.
#Example: multi_oo_escape.pl
use Data::Dumper;
my %chars;
%chars = (
#one tab and one space
whitespace => ' ',
unsafe => '$',
#literal carriage return
unprintable => '^M'
);
my $dumper = Data::Dumper->U
new([%chars]);
$dumper->Useqq(1);
print $dumper->Dump(%chars);
In the ‘multi_oo_escape.pl’ example
above we have a one of each type of
character used as values in a hash that
we then pass as a reference to the
Data::Dumper constructor. We then set
the ‘Useqq’ to a positive value to turn it
on and then call the Dump getting an
output like this:
$VAR1 = {
"unsafe" => "$",
"unprintable" => "r",
"whitespace" => "t "
};
Notice that the unprintable carriage
return (generated in vi using CTRL-V
and then return) is printed as ‘r’ the tab
is printed as ‘t’ and the single dollar is
escaped to prevent it from having any
special meanings. The downside to the
additional functionality of ‘Useqq’ is that
it will incur a performance penalty due
to the fact that most of Data::Dumper is
implemented in C (Using XSUB) whereas
this function is implemented in pure Perl
which has a performance hit.
Now we have covered the basic and
more useful of the features Data::U
Dumper provides if you want to carry on
experimenting with it you should look at
perldoc Data::Dumper
They think it’s all over…
The use of references is often the
difference between an easy to follow and
maintainable piece of code and a tangled
mess of line noise and remains one of
the more important areas of Perl 5 syntax
to understand. Fortunately the best
documentation on references (although
the examples are quite terse) are
included in the Perl distribution itself:
A good place to start is with
‘perlreftut’, its a lighter read than the
others and has a number of easy to
follow examples. perldoc perlreftut
Once you have the basics down you
can either go for the in-depth details
with perldoc perlref or go for more
example code and explanations in
perldoc perllol which focus’s on arrays of
arrays. More varied examples in the data
structure cookbook in perldoc perldsc
A good final note is the reference page
for Data::Dumper itself, possibly the best
way of viewing or debugging references
perldoc Data::Dumper. ■
70 November 2002 www.linux-magazine.com
set differently depending upon the way
in which you are using the module, for
the moment don’t worry about their
purpose but rather how they are set. For
the procedural version:
$Data::Dumper::Useqq = 1;
$Data::Dumper::Varname = 'foo';
These configuration settings are global
so it is prudent to limit the scope the
changes affect by using them within a
separate often anonymous block, this is
best done using ‘local’:
{ #start anonymous block
local $Data::Dumper::Useqq U
= 1;
local $Data::Dumper::Varname U
= 'foo';
} # changes are lost when the U
code reaches here.
The options are set using methods in the
OO style of use and look like this:
$dumper->Useqq('1');
$dumper->Varname('foo');
When the settings are changed via
methods they do not need require the
jumping through hoops to limit the
scope of the change as any change
applies only to the one object:
my $dumper_cust = Data::DumperU
->new([$config_ref]);
$dumper_cust->Varname('foo');
print $dumper_cust->U
Dump($config_ref);
my $dumper_raw = Data::Dumper->U
new([$config_ref]);
print $dumper_raw->U
Dump($config_ref);
When the second Data::Dumper instance
(‘$dumper_raw’) prints its output it will
use ‘VAR’ instead of ‘foo’. Now we have
covered setting the values it is useful to
know that the methods also act as
accessors and if you call one with no
parameters it returns the current value:
my $prefix = $dumper_cust->U
Varname();
#prints 'default prefix is VAR'
print "default prefix is U
$prefixn";
Perl Tutorial: Part 6PROGRAMMING