Perl Python System engineering

how to create pip(python package manager),cpan(perl),cran(R) local mirror repository

안녕하세요. 금융, 연구소, 대학교 등 여러 중요시설 폐쇄망에서 Python, Perl, R  개발을 할 경우 외부인터넷과 연결되지 않아 , pip 나 cpanm 을 제대로 쓸 수 없어 어려움을 많이 겪곤 합니다. 이때 필요한 것이 local repository인데요. 이번에는 제일 대표적으로 많이 쓰이는 pypi, cpan, cran 에 대해서 local repository를 구축하는 방법을 알려드리고자 합니다.   1. simple 웹서버 설치 …

Continue Reading
Perl

[Perl/펄] Hash (Associative Array)를 이용한 File Join 방법

안녕하세요. 오늘은 Perl의 기능 중 hash 에 대해 말해 보고자 합니다. 그 많은 것중에 hash를 써 보고자 하는 이유는 Perl 의 기능중에서 가장 강력했다고 느꼈기 때문입니다. 그러면 배열도 있는데 hash를 쓴 이유는 무엇일까요? 이미 아시다 시피 참조입니다. example > array 예제 @array_num1 = ( 1, 2, 3, 4); print “@array_num1 \n”;   example > hash …

Continue Reading
Perl

[Perl/펄] file에 새로운 내용 추가하는 방법

Writing to a file use strict; use warnings; use Path::Class; use autodie; # die if problem reading or writing a file my $dir = dir(“/tmp”); # /tmp my $file = $dir->file(“file.txt”); # /tmp/file.txt # Get a file_handle (IO::File object) you can write to my $file_handle = $file->openw(); my @list = (‘a’, ‘list’, ‘of’, ‘lines’); foreach …

Continue Reading