This document provides an introduction and overview of the Perl programming language. It discusses the history and uses of Perl, basic Perl syntax and data types, control structures, functions, input/output, and how to use Perl for CGI web development. The key points covered include the origins and popularity of Perl, its pros and cons, how to write "Hello World" programs, define variables and data types, use conditional and loop statements, define and call functions, perform I/O, and generate HTML using CGI.pm for building dynamic web pages and applications with Perl.
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Code smell is any symptom in the source code of a program that possibly indicates a deeper problem.
So let's see what are code smell we can remove from our code.
Some techniques from the heady world of Functional Programming implemented in idiomatic Perl using various techniques: closures, iterators, Devel::Declare, and some distilled evil. New version now with monads! (As presented at http://conferences.yapceurope.org/lpw2008/ )
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
If your not using an ORM (object relational mapper) and are still writing SQL by hand, here's what you need to know.
An introduction into DBIx::Class and some of the concepts and goodies you should be aware off.
Code smell is any symptom in the source code of a program that possibly indicates a deeper problem.
So let's see what are code smell we can remove from our code.
Some techniques from the heady world of Functional Programming implemented in idiomatic Perl using various techniques: closures, iterators, Devel::Declare, and some distilled evil. New version now with monads! (As presented at http://conferences.yapceurope.org/lpw2008/ )
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
If your not using an ORM (object relational mapper) and are still writing SQL by hand, here's what you need to know.
An introduction into DBIx::Class and some of the concepts and goodies you should be aware off.
Full-day tutorial for the dutch php conference 2011 giving a very quick tour around all the various areas of the ZCE syllabus and some tips on the exam styles
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
GridMate - End to end testing is a critical piece to ensure quality and avoid...
tutorial7
1. Programming on the Web(CSC309F)
Tutorial 7: Perl
TA:Wael Abouelsaadat
WebSite: http://www.cs.toronto.edu/~wael
Office-Hour: Friday 12:00-1:00 (SF2110)
Email: wael@cs.toronto.edu
1
2. Introduction to Perl
Ø History of Perl!
Ø Initially developed by Larry Wall (English major student then!) in 1987.
Ø Modules continuously added since version 2.0
Ø Latest version is Perl 5.6.1
Ø Ported to 83 platforms.
Ø Most popular “scripting” language for server-side web development.
Ø Pros && Cons:
ü Powerful in manipulating textual data.
ü A very rich set of pattern-matching operations (used extensively in text-searching, NLP systems,…).
ü Rich set of functions (via Perl modules).
ü Allow you to get the job done very quickly (but not necessarily elegantly! ).
û No GUI library.
û Weird syntax (greatly reduces maintainability of Perl progra ms).
Í Perl is an interpreted language.
Í Unix influence (originally built as a replacement for shell scripts and awk).
Ø helloworld.pl
§ Source:
print ( “Hello to Perl World!” );
print “Hello to Perl World!”; # yes, no brackets!
§ Run it:
C:> perl helloworld.pl
Hello to Perl World!Hello to Perl World!
2
3. Perl – Data types
Ø Specifying Types and Containers:
§ Variables are not explicitly declared. Perl interpreter guesses the type from the way the variable is written.
$var - names a variable that holds a scalar data type (integer, floating point or string).
@var - names a variable that holds an array of scalars, or list.
%var - names a variable that holds an associative array of scalars.
&var - names a subroutine.
§ E.g.
#Defining a scalar
$Name = "Jack";
$Age = 10;
#Defining and handling an array
@Colors = ("Red","Pink","Yellow");
$FirstColor = $Colors[0];
print( $FirstColor ); # Outputs Red
$Colors[0] = "White";
print( $Colors[0] ); # Outputs White
$Colors[100] = “Blue”; # This is valid because Arrays in Perl are dynamic in size
print( $Colors[100] ); # Outputs Blue
print( $#Colors ); # Prints 100 which is the last index of the array. This is a unique variable
# defined by the perl interpreter to give you access to current size of array
# Defining and handling a hash table
%Address = ("Apartment" => 101,
"Street" => "Bloor",
"City" => "Toronto");
$streetName = $Address{"Street"};
print( $streetName ); # Outputs Bloor
$Address{"City"} = "Ottawa";
print( $Address{"City"} ); # Outputs Ottawa
delete $Address{"City"};
@tkeys = keys(%Address); # keys function returns an array of the keys in the hash table
Ø Global vs. Local variables: 3
§ $Name = “John”; # Visible in the whole program
my $Name = “John”; # Visible in the block it is declared in
4. Perl – Strings
Ø Strings:
§ Difference between using the single quote (') and the double quote (") to delimit strings:
$Client = 'John Luu';
@Items = ( "Chocolate", "Biscuits", "Milk");
$Total = 60;
$Transaction = "$Client is buying @Items for $ $Total";
print( $Transaction ); # Outputs John Luu is buy ing Chocolate Biscuits Milk for $ 60
§ Concatenating Strings:
$FirstName = ‘John'; $LastName = “Black”;
$FullName = $First Name . $LastName ; # FullName is now “John Black”
§ String operators:
# lt: less than , le: less or equal , eq: equal , ge: greater or equal , ne: not equal , eq: equal
$Val1 = ‘1.1’; $Val2 = ‘1.0’;
$Val3 = ‘bbb’; $Val4 = ‘aaa’;
if( ($Val1 gt $Val2) && ($Val3 lt $Val4 ) ) ……………………
§ Pattern matching:
# =~: does match , !~: does not match
$CatString = “tomcat”
if ( $CatString =~ /cat/ ) …. # Right-hand-side of these operators must always be a regular expression
4
5. Perl – Control , Loops and Functions
ØControl statements:
§ If statement: Unless Statement
if( $Size < 10.0 ) { unless( $Name eq “John Black” ){
print( "Length is too small!n" ); print( “ You are not John Black” );
} }
elsif ( $Size > 100.0 ) {
print( "Length is too big!n" );
}
else{
print( "Length is just right!n" );
}
Ø Looping:
§ While Loops: For Loops:
while( $n <= 10 ) { for( $n = 1; $n <= 10; ++$n ) {
printf( "%d squared is %dn", $n, $n*$n ); printf( "%d squared is %dn", $n, $n*$n );
$n = $n + 1; }
}
§ For-each Loops:
@Digits = (0,1,2,3,4,5,6,7,8,9);
foreach $n (@Digits) {
printf( "%d squared is %dn", $n, $n*$n );
}
Ø Functions
§ e.g.:
sub func1{
my($param1,$param2) = @_; # parameters are passed in an array called @_
print "Inside func";
$param1 * $param2; # same as return($param1 * $param2 );
}
print(" Before calling func1");
$result = func1( 10,20 ); 5
print(" After calling func1");
print(" result : $result"); # prints result: 200
6. Perl – Functions cont’d
Ø Perl built-in functions:
§ Debugging Functions
# caller( )
# Unwinds the calling stack: ($package, $filename, $line,$SubName , $args,$$contentxt) = caller( $frame );
a( );
sub a { b(); }
sub b { c(); }
sub c { print ( “@{ [ caller(1) ] } “ ); } # Outputs main script.pl 2 main::b 1 0
# die( )
# Kills a process at a given point.
open ( REPORT_FILE, ">report.txt" ) || die " Error opening report.txt $! n " ;
# The above translates to if( open( ….) continue ) else { die …. }
# warn( )
# Does the same thing as die but does not exit.
§ Time Functions
# ($secs , $min, $hr, $mday, $mnth, $yr, $wd, $yd, $ds ) = localtime ( ); Gets local time
# ($user, $system, $child_user, $child_system ) = times( ); Benchmark code
# sleep( $seconds );
§ Variable Functions
# sort(…) Sorts an array in alphabetical order, or by a user-defined function.
@DestArray = ( ‘Apples’, ‘Bananas’, ‘Carrots’ );
@NewArray = sort( @DestArray ); #Be carefull with arrays of numbers
# split(…) Takes a scalar and separates it based on on the criteria us er provides
# @NewArray = split( $text, $ScalarName ); $text can be delimiter or regular expression
@splitArray = spli( “,” , $scalarName );
# grep(…) Finds which element in an array satisfies a condition.
#@NewArray = grep( EXPRESSION , @arrayToMatch );
@Foods = ( ‘turkey’, ‘lucky charms ’, ‘oranges’ ); 6
@longFoods = grep( length($_) > 6 , @foods );
7. Perl – Functions cont’d
# map(…) Makes a new array based on a transform from the old array.
# @NewArray = map( &function, @source_array );
@NewArray = map( MyFunc ( $_ ) , @SourceArray );
§ File Functions
# $bytes = read( FILEHANDLE, $scalar, $length, $offset )
Open( FILEHANDLE, “file” );
$bytes = read( FILEHANDLE, $input, 40, 20 ); # reads 40 characters from file into $input starting at 20
#printf [FILEHANDLE] $format_string, @arrayOfValues;
use FileHandle;
my $Fhandle = new FileHandle( “> my_file” );
$longvarb = “This has 23 chars in it”;
printf $Fhandle “%10.10sn” , $longvarb;
§String Functions
#chop( ) Deletes the last character in a scalar. If applied to Array, hash => does the same!
$line = “ Please chop the letter T”;
chop( $line );
# chomp( ) Deletes the new line character, at the end of the line, if exists.
# More funs: chr, crypt, hex, index, lc, length, oct, ord, pack, reverse, rindex, sprintf, substr, uc, ucfirst
§ Array Functions
#pop, push, shift, splice, unshift
§ Hash Functions
# delete, each, exists, keys, values
§ I/O Functions
# binmode , close, closedir, dbmclose, dbmopen, eof, fileno, flock, format, getc, print, printf, read, readdir,
# rewinddir, seek, seekdir, select, syscall, sysread, sysseek, syswrite, tell, telldir, truncate, write
§ Files/Directories Functions
# -X, chdir, chmod, chown, chroot, fcntl, glob, ioctl, link, lstat, mkdir, open, opendir, readlink, rename,
# rmdir, stat, symlink, umask, unlink, utime
7
8. Perl – Input and Output
Ø Printing Output:
§ Standard Output:
print( STDOUT "Hello World!n" );
print( "Hello World! n" );
§ Files:
open( OUT, ">test.dat" ); # Associates file handle with file
print( OUT “ This text will be written in the file " );
ØReading input:
§ Standard Output:
$NewLine = <STDIN>; # Reads one complete line from standard input
$ProgramArguments = <ARGV>; # Refer to arguments on the command line.
# e.g. perl prog param1 param2 param3
§ Files:
open( IN, “<test.dat" ); # Associates file handle with file
$Line = <IN>; # Reads the first line
close( IN );
8
9. Perl – Program Structure
Ø Perl Files (.pl) vs Perl Modules (.pm)
File.pl File.pm
§ Where is main()?
ØRequire Statement func1
§ Causes the Perl interpreter to “execute” the code in the require d file!
# foo.pl
func2
perl code
more perl code….
some code
1;
#-----------------------------------------------
# Poo.pl
require “foo.pl”;
perl code # you can call functions in foo.pl
Ø Defining a Perl package and the use statement
§ Semi-Object Oriented Programming! Creates a namespace.
# Student.pm
#!/usr/sbin/perl
package Student;
sub new {
# Initialization code
}
sub printDetails{
# perl code …..
}
#-------------------------------
# foo.pl
use Student; # Like inc lude in C++
$new_student = new Student( );
$new_student->printDetails( );
Ø Another way to use use !
Use CGI qw(); # Uses a specific function in a module: qw 9
Ø use strict;
§ Forces Perl interpreter to be strict in using types. Will save you a lot of time !
11. Perl - cgi.pm
Ø Using cgi.pm
use strict;
use CGI qw(:standard);
print ( header( ) );
print( start_html( “Anna Web Page” ) ); # <html><head><title>Anna Web Page</title></head><body>
print( table( ….) );
print( a(…) ); # <a href=“”> xyz </a>
print( radio_group(…..) );
print( end_html( ) ); # </body></html>
11
12. Assignment 3
Ø What is it about? Client(Web-Browser) Server(HTTP Server)
HTML/ Perl/
Ø What can you do right now? JavaScript/ CGI/
§ HTML (design and layout of the web pages) Cookies Cookies
§ JavaScript (validations)
SMTP POP3
Ø What you need to learn?
§ Perl
§ Cookies
§ CGI SMTP Server POP3 Server
12