Friday 9 October 2020

perl webservices mojolicious tutorial

Perl provides several libraries and frameworks for building web services. Here is a brief tutorial on how to build a web service using Perl:

1.Choose a Perl framework or library for web services. Some popular choices include:

  • Mojolicious
  • Dancer2
  • Catalyst
  • Plack
  • CGI

2.Define your web service's API. This involves deciding on the endpoints that your service will expose, as well as the request and response formats. For example, you might define an endpoint for retrieving a list of users, with a JSON response format.

Read more »

Labels: , ,

Friday 2 October 2020

write 1000 uniq perl interview questions and answers to master in perl - part1

  1. Q: In Perl, what does the sigil $_ represent?

    A: In Perl, the sigil $_ represents the default argument to a subroutine. It is a global variable that is set automatically by Perl whenever a subroutine is called.

  2. Q: In Perl, what does the backslash \ do in front of a variable name?

    A: In Perl, the backslash \ in front of a variable name is used to force a string interpretation of the variable, rather than a numeric interpretation. This can be useful when working with non-numeric variables, or when you want to avoid potential side effects caused by Perl's built-in operations on numbers

Read more »

Labels: