Skip to content
asicguru.tech@gmail.com
REGISTER LOGIN
AsicGuru Ventures
  • All Courses
  • CONTACT
  • GALLERY
  • HOME
  • Tutorials

0

Verilog Tutorial

17
  • Verilog Introduction
  • Lexical Tokens
  • Gate-Level Modelling
  • Data Types
  • Operators
  • Operands
  • Modules
  • Behavioral Modeling
  • Timing Controls
  • Procedures: Always and Initial Blocks
  • Functions
  • Tasks
  • Component Inference
  • Finite State Machines.
  • Compiler Directives
  • System Tasks and Functions
  • Test Benches

System Verilog

23
  • System Verilog Introduction
  • Data Types
  • Type Casting
  • Arrays
  • Associative Arrays
  • Dynamic Arrays
  • Queue
  • Operators
  • Procedural statements and Control flow
  • Classes
  • Inheritance
  • Encapsulation
  • This and Super operator
  • In-Line Constraints
  • Class Constraints
  • Virtual Classes
  • Parameterized Classes
  • Classes Summary
  • Singleton Classes
  • Functional Coverage Introduction
  • Covergroup
  • Tools
  • Books

Scripting

15
  • Introduction
  • Perl Tutorial
  • What is Perl
  • Perl: Syntax And Variable
  • Perl Strings
  • Perl Arrays
  • Perl Associative Arrays
  • If/While Syntax
  • File Input
  • Print Output
  • String Processing with Regular Expressions
  • Subroutines
  • Running External Programs
  • References
  • Terse Perl

Makefile

1
  • Makefile Tutorial
View Categories
  • Home
  • Tutorials
  • Scripting
  • What is Perl

What is Perl

1 min read

1. What Is Perl?


Perl is a free, open source programming language created by Larry Wall. Perl aims for adjectives like “practical” and “quick” and not so much words like “structured” or “elegant”. A culture has built up around Perl where people create and give away modules, documentation, sample code and a thousand other useful things .

Perl Niche

Perl is probably best known for text processing — dealing with files, strings, and regular expressions. However, Perl’s quick, informal style makes it attractive for all sorts of little programs. If I need a 23 line program to get some task done, I can write it in Perl and be done in 3 minutes.

Perl code is very portable — I frequently move Perl programs back and forth from the Mac to various Unixes and it just works. With Perl, you are not locked in to any particular vendor or operating system. Perl code is also robust; Perl programs can have bugs, but they will not crash randomly like C or C++ programs. On the other hand, in my opinion, Perl’s easy-going style makes it less appealing for large projects where I would rather use Java.

Running Perl

A Perl program is just a text file. You edit the text of your Perl program, and the Perl interpreter reads that text file directly to “run” it. This structure makes your edit-run-debug cycle nice and fast. On Unix, the Perl interpreter is called “perl” and you run a Perl program by running the Perl interpreter and telling it which file contains your Perl program…


> perl myprog.pl


The interpreter makes one pass of the file to analyze it and if there are no syntax or other  obvious errors, the interpreter runs the Perl code. There is no “main” function — the interpreter just executes the statements in the file starting at the top. Following the Unix convention, the very first line in a Perl file usually looks like this…


#!/usr/bin/perl -w


This special line is a hint to Unix to use the Perl interpreter to execute the code in this file. The “-w” switch turns on warnings which is generally a good idea. In unix, use “chmod” to set the execute bit on a Perl file so it can be run right from the prompt…


> chmod u+x foo.pl

## set the “execute” bit for the file once
>

> foo.pl            ## automatically uses the perl interpreter to “run” this file

The second line in a Perl file is usually a “require” declaration that specifies what version of Perl the program expects…

#!/usr/bin/perl -w
require 5.004;

Updated on May 4, 2025

What are your Feelings

  • Happy
  • Normal
  • Sad
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Perl TutorialPerl: Syntax And Variable

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • May 2025

Categories

  • Slider Post
  • Uncategorized

Copyright @ Asicguru Ventures by Misbah WP | Proudly powered by WordPress