LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-25-2019, 02:56 PM   #61
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 16,897
Blog Entries: 10

Rep: Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026

Quote:
Originally Posted by fatmac View Post
I think you will find lots of perl on the internet & other customised servers.
you don't have to go out of your way to find perl.
in one of my previous posts in this thread i pointed out how many packages on my system (and presumably most linux desktops) are written in perl (or in any case depend on it):
27 (not counting perl-* packages), amongst which such "outdated fringe software" (<- being ironic here) like git, inxi, openssl and rsync.

But apparently OP thought I just wanted to float the fact that I'm using archlinux, or in any case they answered:
Quote:
Originally Posted by young_jedi View Post
@ondoho I use Alpine Linux, but know what you're saying but im not going to maintain those Perl programs..
wth?
 
Old 03-25-2019, 03:17 PM   #62
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915Reputation: 2915
Quote:
Originally Posted by ondoho View Post
you don't have to go out of your way to find perl.
in one of my previous posts in this thread i pointed out how many packages on my system (and presumably most linux desktops) are written in perl (or in any case depend on it):
27 (not counting perl-* packages), amongst which such "outdated fringe software" (<- being ironic here) like git, inxi, openssl and rsync.
Inxi was in fact recently re-written from the ground up in Perl, the developer being very enthusiastic about the speed and coding advantages of writing the tool in Perl.
 
Old 03-26-2019, 06:09 AM   #63
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,836

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Quote:
Originally Posted by NevemTeve View Post
In a forum, 'Halting program' means that the participants keep repeating their parts without convincing each other (cf: infinite loop).
Since people want to keep debating it, we may as well have an infinite loop (source code below output). Enjoy.

Code:
No, it isn't, and here's why:
1. There are pros and cons with any language!
2. It's not just about one particular language!
3. You should have a wide range of skills!
4. You may get a job where your boss wants a certain language to be used, so that is what is used!
5. archlinux also uses Perl programs, as well as Alpine Linux!!
6. Nobody was attacking you!!!

Perl is irrelevant, and nobody uses it anymore!!!

No, it isn't, and here's why:
1. There are pros and cons with any language!
2. It's not just about one particular language!
3. You should have a wide range of skills!
4. You may get a job where your boss wants a certain language to be used, so that is what is used!
5. archlinux also uses Perl programs, as well as Alpine Linux!!
6. Nobody was attacking you!!!

Perl is irrelevant, and nobody uses it anymore!!!

No, it isn't, and here's why:
1. There are pros and cons with any language!
2. It's not just about one particular language!^C
3. You should have a wide range of skills!
4. You may get a job where your boss wants a certain language to be used, so that is what is used!
5. archlinux also uses Perl programs, as well as Alpine Linux!!
6. Nobody was attacking you!!!
Code:
#include <stdio.h>

int main(void) {

    while(1) {
          puts("Perl is irrelevant, and nobody uses it anymore!!!\n\n\
No, it isn't, and here's why:\n\
1. There are pros and cons with any language!\n\
2. It's not just about one particular language!\n\
3. You should have a wide range of skills!\n\
4. You may get a job where your boss wants a certain language to be used, so that is what is used!\n\
5. archlinux also uses Perl programs, as well as Alpine Linux!!\n\
6. Nobody was attacking you!!!\n");

    }

    return 0; // this will never happen...

}
Oh, I forgot, it's in C, and not Perl (sorry, I don't know Perl), my bad ...
 
1 members found this post helpful.
Old 03-26-2019, 06:24 AM   #64
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,513
Blog Entries: 3

Rep: Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784Reputation: 2784
Quote:
Originally Posted by ondoho View Post
you don't have to go out of your way to find perl.
in one of my previous posts in this thread i pointed out how many packages on my system (and presumably most linux desktops) are written in perl (or in any case depend on it):
27 (not counting perl-* packages), amongst which such "outdated fringe software" (<- being ironic here) like git, inxi, openssl and rsync.
Try it with a fuller $PATH setting. Perl is used a lot in the system administration utilities.

Since the thread has devolved to just goofing around, the following depends on what $PATH is. If it includes /sbin and relatives then you get the full list:

Code:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done | wc -l
120

$ lsb_release -rd
Description:    Raspbian GNU/Linux 9.8 (stretch)
Release:        9.8
and

Code:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done | wc -l
121

$ lsb_release -rd
Description:	Devuan GNU/Linux 2.0 (ascii)
Release:	2.0
and

Code:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done | wc -l
38

$ uname -sr
OpenBSD 6.5
So it's at least as important as shell script and AWK for system administration.

Edit1: the OpenBSD count goes up to 35 with all the sets, not just base and man.

Edit2: for a very bare-bones, very busy Alpine system in production

Code:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done 2>/dev/null | wc -l
9

$ cat /etc/alpine-release
3.8.1

Last edited by Turbocapitalist; 03-28-2019 at 01:40 AM.
 
Old 03-26-2019, 02:48 PM   #65
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,583
Blog Entries: 11

Rep: Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605Reputation: 3605
Quote:
Originally Posted by Turbocapitalist View Post
Since the thread has devolved to just goofing around...
To all (not directed at Turbocapitalist specifically), let's not go any further in that direction, but keep future posts strictly on topic, which has been well covered IMO.

The OP has left and other visitors will find some very useful comments here already, so let's let it settle down here for now and take the general discussion to the General forum.

Thanks! And thanks to all who have provided answers to the original question!
 
Old 03-27-2019, 01:50 PM   #66
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 16,897
Blog Entries: 10

Rep: Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026
Quote:
Originally Posted by Turbocapitalist View Post
Try it with a fuller $PATH setting. Perl is used a lot in the system administration utilities.

[ censored ], the following depends on what $PATH is. If it includes /sbin and relatives then you get the full list:
mine's longer!
Code:
$ echo $PATH
/usr/lib/colorgcc/bin:/home/ondoho/.local/bin:/home/ondoho/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/emulator:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done | wc -l
209

$ lsb_release -rd
Description:	Arch Linux
Release:	rolling
this is useful information for anybody who ask themselves if perl is still relevant.
 
Old 03-27-2019, 02:56 PM   #67
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,238

Rep: Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453Reputation: 5453
offtopic, but:
Code:
find ${PATH//:/ } -type f -exec file {} \; | grep -c 'Perl script text'
And it will go into subdirs (if there were any)
 
Old 03-27-2019, 09:26 PM   #68
young_jedi
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
Code:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done | wc -l
0

$ uname -sr
Alpine Linux 3.9.2
Turns out Perl is not so fundamental for use in system administration utilities, atleast on Alpine Linux.. And for those who say WTH is Alpine Linux and who cares? Its the base system Docker uses (Docker is a technology that supercedes virtual machines in many ways)...

Read and weep (Fall of Perl): https://www.fastcompany.com/3026446/...ising-language

Last edited by young_jedi; 03-27-2019 at 10:48 PM.
 
Old 03-27-2019, 09:36 PM   #69
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,149

Rep: Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523
Have you just reinvented the 'which' command? Well done.
 
Old 03-27-2019, 09:49 PM   #70
young_jedi
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
offtopic, but:
Code:
find ${PATH//:/ } -type f -exec file {} \; | grep -c 'Perl script text'
And it will go into subdirs (if there were any)
The find command is by default recursive
 
Old 03-27-2019, 09:51 PM   #71
young_jedi
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
Have you just reinvented the 'which' command? Well done.
Not sure what you're asking but Alpine uses busybox which is an endpoint for numerous symlinks for various utilities
 
Old 03-27-2019, 10:08 PM   #72
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,149

Rep: Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523
'which' is a program, that searches programs on PATH. Also there is 'type -f':
Code:
$ which bash
/usr/local/bin/bash

$ type -f bash
bash is /usr/local/bin/bash

$ type -f which
which is hashed (/usr/bin/which)

$ type -f type 
type is a shell builtin
 
Old 03-27-2019, 10:10 PM   #73
young_jedi
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
^ I know, there's also the whereis command.. But I not sure what the context of your question was..

Edit: If you werent asking me then oops sorry..

Last edited by young_jedi; 03-27-2019 at 10:16 PM.
 
Old 03-27-2019, 10:44 PM   #74
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,149

Rep: Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523Reputation: 1523
I see now, in post#68 you weren't searching for perl binary, but for perl-scripts.
You are right then, in Docker-images or single-floppy install/rescue images you won't find any. (Also you might not find 'bash' either, usually 'ash' or 'dash' is used in these.)
 
Old 03-28-2019, 07:35 AM   #75
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,657

Rep: Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911Reputation: 6911
Quote:
Originally Posted by young_jedi View Post
Code:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

$ for p in $(echo $PATH|tr ':' ' ');do find $p -type f -exec sh -c "head -n 1 {} | grep -q perl && echo {}" \; ; done | wc -l
0

$ uname -sr
Alpine Linux 3.9.2
Turns out Perl is not so fundamental for use in system administration utilities, atleast on Alpine Linux.. And for those who say WTH is Alpine Linux and who cares? Its the base system Docker uses (Docker is a technology that supercedes virtual machines in many ways)...
Yes, we all know what Docker is and most of us are probably far more familiar with it than you are.
Quote:
Read and weep (Fall of Perl): https://www.fastcompany.com/3026446/...ising-language
Wow...another opinion piece. Should we post a few that say something opposite?? You don't seem to get that:
  • Opinions aren't very relevant in this context
  • No one CARES if you use perl or not. Really.
  • You don't care about discussion or learning, you just want to shovel out your half-baked opinion, and expect everyone to agree. And you're upset because we don't.
  • And didn't you say you were leaving? https://www.linuxquestions.org/quest...ml#post5977017

Last edited by TB0ne; 03-28-2019 at 07:37 AM.
 
5 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please ensure your reply is still relevant and timely. TheIndependentAquarius LQ Suggestions & Feedback 3 11-17-2012 11:44 AM
Is The UNIX-HATER Handbook still relevant today? mangotree General 4 07-16-2012 10:28 AM
LXer: Is Fedora Linux Still Relevant? LXer Syndicated Linux News 2 06-20-2009 06:09 AM
LXer: Is Fedora Linux Still Relevant? LXer Syndicated Linux News 0 06-19-2009 10:30 PM
LXer: Debian @15 is it still relevant? LXer Syndicated Linux News 1 08-18-2008 06:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration