#!/bin/bash URL="https://www.cpan.org/src/README.html" # Get version number from website VERSION=$(curl -s -L "$URL" | grep -A2 'class="latest"' | tail -n1 | grep -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}') echo "$VERSION"