diff options
author | Roman Savelyev | 2015-10-02 01:08:05 +0300 |
---|---|---|
committer | Roman Saveljev | 2015-10-02 01:42:40 +0300 |
commit | 2eb40f1fe61955c17b82cb17fd2a792d30fcb8f8 (patch) | |
tree | cc8c9ae7037f7abc9c217b53e011288ea38e883e /uri2file | |
download | aur-2eb40f1fe61955c17b82cb17fd2a792d30fcb8f8.tar.gz |
Initial commit
Diffstat (limited to 'uri2file')
-rwxr-xr-x | uri2file | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/uri2file b/uri2file new file mode 100755 index 000000000000..12c9c3d1b0bf --- /dev/null +++ b/uri2file @@ -0,0 +1,31 @@ +#!/usr/bin/env perl + +# The MIT License (MIT) +# +# Copyright (c) 2015 Roman Savelyev +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +use feature 'say'; +use strict; +use URI; + +my $u = URI->new($ARGV[0]) || die $!; +say $u->path; + |