Skip to content
The Unix Tips
cat /vishal/brain > theunixtips.com
  • About
  • Contact Me

Category: Perl

Perl/Unix Admin

perl : find if IP address is in Network range

Posted on June 10, 2011 by Vishal Jain

Using NetAddr::IP one can find if a given IP address is in provided Network range or on the subnet.

Perl

perl : Remove empty lines from an array

Posted on April 2, 2011 by Vishal Jain

Using grep and pattern matching, empty lines can be removed from an array in perl.

Perl

perl : Process Command Line Arguments

Posted on September 18, 2010 by Vishal Jain

Getopt module provides a very good way to process command line flags and also performs the type checking of the values provided.

Perl

perl : Generate Random Data Natively

Posted on September 11, 2010 by Vishal Jain

Using "rand" built-in random data or password can be generated in perl natively without using any external modules.

Perl

perl : Extract filename from full path

Posted on May 26, 2010 by Vishal Jain

Use substr and rindex to extract the name of file from full pathname. Or use basename provided by File::Basename.

Perl

perl : Read filenames from a Directory

Posted on May 26, 2010 by Vishal Jain

Using perl glob function filenames from a directory can be read easily. Simply use @files = to get filesnames that match the pattern in the given directory.

Bash/OS Interoperability/Perl/Unix Admin

find broken symlinks

Posted on May 24, 2010 by Vishal Jain

Using find and test commands you can search for the dangling or broken soft links on a Unix system.

Perl

perl : Set different TimeZone for script

Posted on May 9, 2010 by Vishal Jain

$ENV{TZ} sets the environment in perl scripts.

Perl

perl : Create unix time from readable time

Posted on April 22, 2010 by Vishal Jain

"mktime" for unixtime and "localtime" for readable time.

Recent Posts

  • OTTO – Automate C/C++ CMake for Large Repositories
  • How to persist iptables settings on debian
  • How to Change Console Fonts In Ubuntu for 4K Screen
  • HP Spectre x360 convertible and Linux
  • HOWTO Develop Apache Module in C++

Top Posts

  • xming : Client 4 rejected from IP
  • HP Spectre x360 convertible and Linux
  • perl : Extract filename from full path
  • bash : Count number of recurrence of lines
  • VirtualBox : Use Raw Disk to load Windows under Linux
  • How to Change Console Fonts In Ubuntu for 4K Screen
  • vpn : Split Tunnel Concept
  • bash : Signal Handling
  • bash : Self redirect of Script's output to a file
  • perl : Remove empty lines from an array

Recent Posts

  • OTTO – Automate C/C++ CMake for Large Repositories
  • How to persist iptables settings on debian
  • How to Change Console Fonts In Ubuntu for 4K Screen
  • HP Spectre x360 convertible and Linux
  • HOWTO Develop Apache Module in C++

Follow Me

  • LinkedIn
  • GitHub
© 2021 The Unix Tips
Powered by WordPress | Theme: Graphy by Themegraphy